diff options
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. |
