import sys
sys.path.insert(0, "/usr/lib/portage/pym")
-from copy import copy
from optparse import OptionParser, OptionValueError
import re
return errors
-# this sucks, should track this in a different manner.
-#modules = {"world" : WorldHandler,
-# "vdbkeys": VdbKeyHandler}
-modules = {"world" : WorldHandler}
+def emaint_main(myargv):
-module_names = modules.keys()
-module_names.sort()
-module_names.insert(0, "all")
+ # TODO: Create a system that allows external modules to be added without
+ # the need for hard coding.
+ modules = {"world" : WorldHandler}
+
+ module_names = modules.keys()
+ module_names.sort()
+ module_names.insert(0, "all")
-if __name__ == "__main__":
def exclusive(option, *args, **kw):
var = kw.get("var", None)
if var is None:
parser.action = None
- (options, args) = parser.parse_args()
+ (options, args) = parser.parse_args(args=myargv)
if len(args) != 1:
parser.error("Incorrect number of arguments")
if args[0] not in module_names:
print "\n"
print "Finished"
+
+if __name__ == "__main__":
+ emaint_main(sys.argv[1:])