From 12bad32223c9526224fdaf8e75acaad964ea33b9 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 3 Apr 2013 16:28:22 -0700 Subject: [PATCH] Fix import of version If the import fails it wipes out the global pylorax import. --- src/sbin/lorax | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sbin/lorax b/src/sbin/lorax index 4aab5406..2337f95d 100755 --- a/src/sbin/lorax +++ b/src/sbin/lorax @@ -78,11 +78,10 @@ def setup_logging(opts): def main(args): # get lorax version try: - import pylorax.version + from pylorax import version + vernum = version.num except ImportError: vernum = "devel" - else: - vernum = pylorax.version.num version = "{0}-{1}".format(os.path.basename(args[0]), vernum) usage = "%prog -p PRODUCT -v VERSION -r RELEASE -s REPOSITORY OUTPUTDIR"