diff options
Diffstat (limited to 'Lib/packaging/dist.py')
-rw-r--r-- | Lib/packaging/dist.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/packaging/dist.py b/Lib/packaging/dist.py index 3019b7c166..4027d2387c 100644 --- a/Lib/packaging/dist.py +++ b/Lib/packaging/dist.py @@ -409,7 +409,7 @@ Common commands: (see '--help-commands' for more) for help_option, short, desc, func in cmd_class.help_options: if hasattr(opts, help_option.replace('-', '_')): help_option_found = True - if hasattr(func, '__call__'): + if callable(func): func() else: raise PackagingClassError( @@ -733,7 +733,7 @@ Common commands: (see '--help-commands' for more) else: hook_obj = hook - if not hasattr(hook_obj, '__call__'): + if not callable(hook_obj): raise PackagingOptionError('hook %r is not callable' % hook) logger.info('running %s %s for command %s', |