summaryrefslogtreecommitdiffstats
path: root/subcmds/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/__init__.py')
-rw-r--r--subcmds/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/subcmds/__init__.py b/subcmds/__init__.py
index a49e7bd3..c3de9d1e 100644
--- a/subcmds/__init__.py
+++ b/subcmds/__init__.py
@@ -16,6 +16,7 @@
16 16
17import os 17import os
18 18
19# A mapping of the subcommand name to the class that implements it.
19all_commands = {} 20all_commands = {}
20 21
21my_dir = os.path.dirname(__file__) 22my_dir = os.path.dirname(__file__)
@@ -37,7 +38,7 @@ for py in os.listdir(my_dir):
37 ['%s' % name]) 38 ['%s' % name])
38 mod = getattr(mod, name) 39 mod = getattr(mod, name)
39 try: 40 try:
40 cmd = getattr(mod, clsn)() 41 cmd = getattr(mod, clsn)
41 except AttributeError: 42 except AttributeError:
42 raise SyntaxError('%s/%s does not define class %s' % ( 43 raise SyntaxError('%s/%s does not define class %s' % (
43 __name__, py, clsn)) 44 __name__, py, clsn))