Commits

Geoffrey Sneddon committed 85a6d32

Fix loading arbitrary modules.

  • Participants
  • Parent commits 44c9c6d
  • Tags 1.0RC4

Comments (0)

Files changed (2)

 
 def getOptParser():
     def enable(option, opt_str, value, parser, *args, **kwargs):
-        parser.values.processes.add(opt_str)
+        parser.values.processes.add(value)
 
     def disable(option, opt_str, value, parser, *args, **kwargs):
-        parser.values.processes.discard(opt_str)
+        parser.values.processes.discard(value)
 
     parser = OptionParser(usage = __doc__, version="%prog 1.0")
 

File anolislib/generator.py

             process_module = getattr(__import__('processes', globals(),
                                                 locals(), [process], -1),
                                     process)
-        except ImportError:
+        except AttributeError:
             process_module = __import__(process, globals(), locals(), [], -1)
 
         getattr(process_module, process)(tree, **kwargs)