diff options
| author | Tarek Ziade <tarek@ziade.org> | 2010-11-07 20:33:48 +0100 |
|---|---|---|
| committer | Tarek Ziade <tarek@ziade.org> | 2010-11-07 20:33:48 +0100 |
| commit | 87d966414b6915c3724fb9a9da9c9cfaaba25202 (patch) | |
| tree | 9235267b72218043b20688820c696478e4a8e486 /distutils2/command/cmd.py | |
| parent | 7330b14acc134859de6293983306b9e57134ef9e (diff) | |
| download | disutils2-87d966414b6915c3724fb9a9da9c9cfaaba25202.tar.gz | |
now sub_commands can be configure in the .cfg files
Diffstat (limited to 'distutils2/command/cmd.py')
| -rw-r--r-- | distutils2/command/cmd.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/distutils2/command/cmd.py b/distutils2/command/cmd.py index 39113d8..bff9ac9 100644 --- a/distutils2/command/cmd.py +++ b/distutils2/command/cmd.py @@ -359,9 +359,13 @@ class Command(object): run for the current distribution. Return a list of command names. """ commands = [] - for (cmd_name, method) in self.sub_commands: - if method is None or method(self): - commands.append(cmd_name) + for sub_command in self.sub_commands: + if len(sub_command) == 2: + cmd_name, method = sub_command + if method is None or method(self): + commands.append(cmd_name) + else: + commands.append(sub_command) return commands |
