From 3377bc22e4b3175d1d7a2f464659dd062c14d40f Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Thu, 9 Oct 2008 21:46:41 -1000 Subject: [PATCH] Reference the conf has in Lorax rather than globally. --- src/bin/lorax | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bin/lorax b/src/bin/lorax index b1cc9c17..153872c4 100755 --- a/src/bin/lorax +++ b/src/bin/lorax @@ -48,7 +48,7 @@ def usage(prog): if __name__ == "__main__": prog = os.path.basename(sys.argv[0]) opts, args, mirrorlist, extrarepos = [], [], [], [] - version, product, release, output, repo = None, None, None, None, None + confdir, version, product, release, output, repo = None, None, None, None, None, None debug = False cleanup = False variant, updates = '', '' @@ -85,7 +85,7 @@ if __name__ == "__main__": mirrorlist.append(a) elif o in ('-c', '--confdir'): if os.path.isdir(a): - pylorax.conf['confdir'] = a + confdir = a else: sys.stderr.write("ERROR: %s is not a directory.\n" % (a,)) elif o in ('-C', '--cleanup'): @@ -103,6 +103,10 @@ if __name__ == "__main__": sys.exit(1) lorax = pylorax.Lorax(repos=args, output=output, mirrorlist=mirrorlist) + + if confdir is not None: + lorax.conf['confdir'] = confdir + lorax.run() if cleanup: