2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-21 17:11:58 +00:00

Fix imgutil pack expecting addpackagelist

The attribute only populates on a different subcommand,
so only process if the attribute exists.
This commit is contained in:
Jarrod Johnson 2022-05-04 06:44:07 -04:00
parent 98d22ffabc
commit 0301f5ca68

View File

@ -394,10 +394,11 @@ class OsHandler(object):
except AttributeError:
pkglist = ''
self.addpkglists = []
for plist in args.addpackagelist:
if os.path.exists(os.path.abspath(plist)):
plist = os.path.abspath(plist)
self.addpkglists.append(plist)
if hasattr(args, 'addpackagelist'):
for plist in args.addpackagelist:
if os.path.exists(os.path.abspath(plist)):
plist = os.path.abspath(plist)
self.addpkglists.append(plist)
if pkglist:
if os.path.exists(os.path.abspath(pkglist)):
pkglist = os.path.abspath(pkglist)