mercurial/commands.py
changeset 4738 c41a404ac387
parent 4730 eadfaa9ec487
child 4777 44e17f5029d0
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1395,6 +1395,8 @@ def help_(ui, name=None, with_version=Fa
         try:
             ct = mod.cmdtable
         except AttributeError:
+            ct = None
+        if not ct:
             ui.status(_('no commands defined\n'))
             return