diff options
| author | ianb <devnull@localhost> | 2005-05-17 03:06:22 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-05-17 03:06:22 +0000 |
| commit | ed51c888895583a856f40ce951c0c131a26f9ca3 (patch) | |
| tree | 8f56068ec37a20406eab36c1f4a86ff233a5ddb8 /paste/app_setup.py | |
| parent | a3ce49f606ece7bfc639a7d27fa6a4c50b0b8b37 (diff) | |
| download | paste-ed51c888895583a856f40ce951c0c131a26f9ca3.tar.gz | |
A bunch of pylint-inspired changes; all minor code cleanup
Diffstat (limited to 'paste/app_setup.py')
| -rw-r--r-- | paste/app_setup.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/paste/app_setup.py b/paste/app_setup.py index 007b9d5..a0b6047 100644 --- a/paste/app_setup.py +++ b/paste/app_setup.py @@ -49,7 +49,8 @@ def find_template_info(args): except ImportError, e: raise InvalidCommand( 'No template exists by the name %r (%s)' % (template_name, e)) - return (server_conf_fn, template_name, os.path.dirname(template_mod.__file__), template_mod) + return (server_conf_fn, template_name, + os.path.dirname(template_mod.__file__), template_mod) def find_template_option(args): copy = args[:] @@ -102,6 +103,7 @@ class CommandRunner(object): self.commands = {} self.command_aliases = {} self.register_standard_commands() + self.server_conf_fn = None def run(self, argv, template_name, template_dir, template_module, server_conf_fn): @@ -259,9 +261,11 @@ class CommandList(Command): if self.args and not fnmatch.fnmatch(name, self.args[0]): continue if not self.options.verbose: - print '%s: %s\n' % (name, self.template_description().splitlines()[0]) + print '%s: %s\n' % ( + name, self.template_description().splitlines()[0]) else: - return '%s: %s\n' % (self.name, self.template_description()) + return '%s: %s\n' % ( + self.name, self.template_description()) # @@: for verbosity >= 2 we should give lots of metadata any = True if not any: @@ -346,8 +350,8 @@ class CommandCreate(Command): template_options['absolute_parent'] = os.path.dirname( os.path.abspath(output_dir)) template_options['template_name'] = self.template_name - self.copy_dir(file_dir, output_dir, template_options, self.options.verbose, - self.options.simulate) + self.copy_dir(file_dir, output_dir, template_options, + self.options.verbose, self.options.simulate) def copy_dir(self, *args, **kw): copy_dir(*args, **kw) |
