summaryrefslogtreecommitdiff
path: root/cliff/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'cliff/command.py')
-rw-r--r--cliff/command.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cliff/command.py b/cliff/command.py
index c020edc..35f1ef7 100644
--- a/cliff/command.py
+++ b/cliff/command.py
@@ -137,8 +137,10 @@ class Command(object):
(h.obj.get_epilog() for h in self._hooks),
)
parts.extend(hook_epilogs)
- app_dist_name = _get_distribution_for_module(
- inspect.getmodule(self.app)
+ app_dist_name = getattr(
+ self, 'app_dist_name', _get_distribution_for_module(
+ inspect.getmodule(self.app)
+ )
)
dist_name = _get_distribution_for_module(inspect.getmodule(self))
if dist_name and dist_name != app_dist_name: