diff options
| author | Tarek Ziade <tarek@ziade.org> | 2010-11-13 01:29:47 +0100 |
|---|---|---|
| committer | Tarek Ziade <tarek@ziade.org> | 2010-11-13 01:29:47 +0100 |
| commit | 795e5bf4a7b8adbf356a021a1d5c2c293d221f6b (patch) | |
| tree | c6ad3ecd157d8e8fc0ce777bb959581a49939c16 /distutils2/command/cmd.py | |
| parent | 21b0542823fa265c5c09ecff2b1d21c5e85daaa9 (diff) | |
| download | disutils2-795e5bf4a7b8adbf356a021a1d5c2c293d221f6b.tar.gz | |
now distutils2 uses set_command to set its own commands
Diffstat (limited to 'distutils2/command/cmd.py')
| -rw-r--r-- | distutils2/command/cmd.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/distutils2/command/cmd.py b/distutils2/command/cmd.py index bff9ac9..e2cfd52 100644 --- a/distutils2/command/cmd.py +++ b/distutils2/command/cmd.py @@ -296,11 +296,12 @@ class Command(object): # -- Convenience methods for commands ------------------------------ - def get_command_name(self): - if hasattr(self, 'command_name'): - return self.command_name + @classmethod + def get_command_name(cls): + if hasattr(cls, 'command_name'): + return cls.command_name else: - return self.__class__.__name__ + return cls.__name__ def set_undefined_options(self, src_cmd, *options): """Set values of undefined options from another command. |
