summaryrefslogtreecommitdiff
path: root/distutils2/command/cmd.py
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2010-11-07 20:33:48 +0100
committerTarek Ziade <tarek@ziade.org>2010-11-07 20:33:48 +0100
commit87d966414b6915c3724fb9a9da9c9cfaaba25202 (patch)
tree9235267b72218043b20688820c696478e4a8e486 /distutils2/command/cmd.py
parent7330b14acc134859de6293983306b9e57134ef9e (diff)
downloaddisutils2-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.py10
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