mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
Add clear error when base profile doesn't exist
If the user specifies a wrong '-b', indicate clearly that is the case, and do so early.
This commit is contained in:
parent
430b24081c
commit
e93e4abd83
@ -1206,7 +1206,14 @@ def recursecp(source, targ):
|
||||
def pack_image(args):
|
||||
outdir = args.profilename
|
||||
if '/' in outdir:
|
||||
raise Exception('Full path not supported, supply only the profile name')
|
||||
raise Exception('Full path not supported, supply only the profile name\n')
|
||||
if args.baseprofile:
|
||||
baseprofiledir = args.baseprofile
|
||||
if '/' not in args.baseprofile:
|
||||
baseprofiledir = os.path.join('/var/lib/confluent/public/os', args.baseprofile)
|
||||
if not os.path.exists(baseprofiledir):
|
||||
sys.stderr.write('Specified base profile "{0}" does not seem to exist\n'.format(baseprofiledir))
|
||||
sys.exit(1)
|
||||
privdir = os.path.join('/var/lib/confluent/private/os/', outdir)
|
||||
outdir = os.path.join('/var/lib/confluent/public/os/', outdir)
|
||||
if os.path.exists(outdir):
|
||||
|
Loading…
Reference in New Issue
Block a user