summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2008-11-25 21:32:37 -0500
committerTodd Zullinger <tmz@pobox.com>2008-11-25 21:32:37 -0500
commitc17351a9cbd7be3f4dabb14b3f159a46edc8a6f0 (patch)
treea0e3f5b3c0892f7bda5cf8c0949ac835ce23bf6c
parent58109d0164c5b2bc3d60b7f27d46039120bee11d (diff)
downloadpuppet-host-package-c17351a9cbd7be3f4dabb14b3f159a46edc8a6f0.zip
puppet-host-package-c17351a9cbd7be3f4dabb14b3f159a46edc8a6f0.tar.gz
puppet-host-package-c17351a9cbd7be3f4dabb14b3f159a46edc8a6f0.tar.xz
Minor code reorganization
-rwxr-xr-xpuppethost.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/puppethost.py b/puppethost.py
index bbdceba..bd7d2af 100755
--- a/puppethost.py
+++ b/puppethost.py
@@ -238,11 +238,6 @@ def _main():
opts.force_tarball = True
opts.force_package = True
- opts.rpmdir = os.path.abspath(opts.rpmdir)
- opts.ssldir = os.path.abspath(opts.ssldir)
- if not opts.destssldir:
- opts.destssldir = opts.ssldir
-
if opts.allcerts:
args = []
for cert in glob.glob('%s/ca/signed/*.pem' % opts.ssldir):
@@ -255,10 +250,15 @@ def _main():
if not args:
raise SystemExit(parser.print_usage())
+ opts.rpmdir = os.path.abspath(opts.rpmdir)
+ opts.ssldir = os.path.abspath(opts.ssldir)
for d in [opts.rpmdir, opts.ssldir]:
if not os.path.isdir(d):
raise SystemExit('%s does not exist (or is not a directory)' % d)
+ if not opts.destssldir:
+ opts.destssldir = opts.ssldir
+
if not os.path.isfile(opts.template):
raise SystemExit('Template file (%s) does not exist' % opts.template)