diff options
| -rwxr-xr-x | puppethost.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/puppethost.py b/puppethost.py index eae1e8e..3f6671d 100755 --- a/puppethost.py +++ b/puppethost.py @@ -278,16 +278,18 @@ def _main(): if not args: raise SystemExit(parser.print_usage()) - opts.rpmdir = os.path.abspath(opts.rpmdir) - opts.ssldir = os.path.abspath(opts.ssldir) + opts.rpmdir = os.path.expanduser(os.path.abspath(opts.rpmdir)) + opts.ssldir = os.path.expanduser(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 + else: + opts.destssldir = os.path.expanduser(os.path.abspath(opts.destssldir)) - opts.template = opts.template % opts.__dict__ + opts.template = os.path.expanduser(opts.template % opts.__dict__) if not os.path.isfile(opts.template): raise SystemExit('Template file (%s) does not exist' % opts.template) |
