Ticket #159: patch-159.patch

File patch-159.patch, 1.2 KB (added by thrawn01, 2 years ago)

PEP-8 police, patch is now in compliance

  • paste/script/appinstall.py

    diff -r 29f1a7a640ab paste/script/appinstall.py
    a b  
    445445        config_file = os.path.join(os.getcwd(), config_file) 
    446446        self.logging_file_config(config_file) 
    447447        conf = appconfig(config_spec, relative_to=os.getcwd()) 
     448        # Keep looking until the app context is found 
     449        while hasattr( conf.context, 'next_context'): 
     450            conf.context = conf.context.next_context 
    448451        ep_name = conf.context.entry_point_name 
    449452        ep_group = conf.context.protocol 
    450453        dist = conf.context.distribution 
    451454        if dist is None: 
    452455            raise BadCommand( 
    453                 "The section %r is not the application (probably a filter).  You should add #section_name, where section_name is the section that configures your application" % plain_section) 
     456                "The section %r is not the application (probably a filter)" % ep_name) 
    454457        installer = self.get_installer(dist, ep_group, ep_name) 
    455458        installer.setup_config( 
    456459            self, config_file, section, self.sysconfig_install_vars(installer))