modulecore.py

changeset 155
5a9b5065f53f
parent 154
df862cca1773
child 157
aaa5618e8dc2
--- a/modulecore.py	Sun Aug 16 23:30:11 2015 +0300
+++ b/modulecore.py	Mon Aug 17 02:05:16 2015 +0300
@@ -63,8 +63,12 @@
 		module = __import__ (fn)
 		Modules[fn] = module
 
-		for cmd in module.ModuleData['commands']:
-			install_command (cmd, module)
+		if not hasattr (module, 'ModuleData'):
+			continue # No manifest
+
+		if 'commands' in module.ModuleData:
+			for cmd in module.ModuleData['commands']:
+				install_command (cmd, module)
 
 		if 'hooks' in module.ModuleData:
 			for key, hooks in module.ModuleData['hooks'].items():

mercurial