Commit 5ff3e081 authored by Tarek Ziadé's avatar Tarek Ziadé

Merged revisions 71589 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71589 | tarek.ziade | 2009-04-13 22:14:54 +0200 (Mon, 13 Apr 2009) | 1 line

  pep8-fied
........
parent 21748d58
...@@ -93,9 +93,8 @@ class Command: ...@@ -93,9 +93,8 @@ class Command:
# always calls 'finalize_options()', to respect/update it. # always calls 'finalize_options()', to respect/update it.
self.finalized = 0 self.finalized = 0
# XXX A more explicit way to customize dry_run would be better. # XXX A more explicit way to customize dry_run would be better.
def __getattr__ (self, attr): def __getattr__(self, attr):
if attr == 'dry_run': if attr == 'dry_run':
myval = getattr(self, "_" + attr) myval = getattr(self, "_" + attr)
if myval is None: if myval is None:
...@@ -105,7 +104,7 @@ class Command: ...@@ -105,7 +104,7 @@ class Command:
else: else:
raise AttributeError(attr) raise AttributeError(attr)
def ensure_finalized (self): def ensure_finalized(self):
if not self.finalized: if not self.finalized:
self.finalize_options() self.finalize_options()
self.finalized = 1 self.finalized = 1
...@@ -175,7 +174,6 @@ class Command: ...@@ -175,7 +174,6 @@ class Command:
This method must be implemented by all command classes. This method must be implemented by all command classes.
""" """
raise RuntimeError("abstract method -- subclass %s must override" raise RuntimeError("abstract method -- subclass %s must override"
% self.__class__) % self.__class__)
...@@ -351,7 +349,7 @@ class Command: ...@@ -351,7 +349,7 @@ class Command:
preserve_times, not self.force, link, preserve_times, not self.force, link,
dry_run=self.dry_run) dry_run=self.dry_run)
def copy_tree (self, infile, outfile, preserve_mode=1, preserve_times=1, def copy_tree(self, infile, outfile, preserve_mode=1, preserve_times=1,
preserve_symlinks=0, level=1): preserve_symlinks=0, level=1):
"""Copy an entire directory tree respecting verbose, dry-run, """Copy an entire directory tree respecting verbose, dry-run,
and force flags. and force flags.
...@@ -373,7 +371,6 @@ class Command: ...@@ -373,7 +371,6 @@ class Command:
return archive_util.make_archive(base_name, format, root_dir, base_dir, return archive_util.make_archive(base_name, format, root_dir, base_dir,
dry_run=self.dry_run) dry_run=self.dry_run)
def make_file(self, infiles, outfile, func, args, def make_file(self, infiles, outfile, func, args,
exec_msg=None, skip_msg=None, level=1): exec_msg=None, skip_msg=None, level=1):
"""Special case of 'execute()' for operations that process one or """Special case of 'execute()' for operations that process one or
...@@ -406,7 +403,6 @@ class Command: ...@@ -406,7 +403,6 @@ class Command:
else: else:
log.debug(skip_msg) log.debug(skip_msg)
# XXX 'install_misc' class not currently used -- it was the base class for # XXX 'install_misc' class not currently used -- it was the base class for
# both 'install_scripts' and 'install_data', but they outgrew it. It might # both 'install_scripts' and 'install_data', but they outgrew it. It might
# still be useful for 'install_headers', though, so I'm keeping it around # still be useful for 'install_headers', though, so I'm keeping it around
...@@ -423,10 +419,10 @@ class install_misc(Command): ...@@ -423,10 +419,10 @@ class install_misc(Command):
self.install_dir = None self.install_dir = None
self.outfiles = [] self.outfiles = []
def _install_dir_from (self, dirname): def _install_dir_from(self, dirname):
self.set_undefined_options('install', (dirname, 'install_dir')) self.set_undefined_options('install', (dirname, 'install_dir'))
def _copy_files (self, filelist): def _copy_files(self, filelist):
self.outfiles = [] self.outfiles = []
if not filelist: if not filelist:
return return
...@@ -435,5 +431,5 @@ class install_misc(Command): ...@@ -435,5 +431,5 @@ class install_misc(Command):
self.copy_file(f, self.install_dir) self.copy_file(f, self.install_dir)
self.outfiles.append(os.path.join(self.install_dir, f)) self.outfiles.append(os.path.join(self.install_dir, f))
def get_outputs (self): def get_outputs(self):
return self.outfiles return self.outfiles
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment