From 9bf785a0fbaf5f8d64037d2010c6c0b0416db1f0 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 24 Aug 2010 14:47:50 +0200 Subject: change configpath with setup, parser use plugins in homedir --- pyLoadCore.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index e140b42a3..be6d40126 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -76,7 +76,7 @@ class Core(object): if len(argv) > 1: try: - options, args = getopt(argv[1:], 'vca:hdus', ["version", "clear", "add=", "help", "debug", "user", "setup", "configdir="]) + options, args = getopt(argv[1:], 'vca:hdus', ["version", "clear", "add=", "help", "debug", "user", "setup", "configdir"]) for option, argument in options: if option in ("-v", "--version"): @@ -109,6 +109,12 @@ class Core(object): s = Setup(pypath, self.config) s.start() exit() + elif option == "--configdir": + from module.setup import Setup + self.config = ConfigParser() + s = Setup(pypath, self.config) + s.conf_path(True) + exit() except GetoptError: print 'Unknown Argument(s) "%s"' % " ".join(argv[1:]) self.print_help() @@ -127,7 +133,7 @@ class Core(object): print " -u, --user", " " * 13, "Set new User and password" print " -d, --debug", " " * 12, "Enable debug mode" print " -s, --setup", " " * 12, "Run Setup Assistent" - print " --configdir=", " " * 5, "Custom config dir, (see config folder for permanent change)" + print " --configdir", " " * 12, "Set new config directory" print " -h, --help", " " * 13, "Display this help screen" print "" @@ -160,7 +166,8 @@ class Core(object): print "Setup failed" if not res: remove("pyload.conf") - exit() + + exit() try: signal.signal(signal.SIGQUIT, self.quit) except: pass -- cgit v1.2.3