From 7b19b3bd487b9876f758338840eeda2afbfe4342 Mon Sep 17 00:00:00 2001 From: Lubomir Gallovic Date: Thu, 13 Aug 2020 13:50:26 +0200 Subject: [PATCH] Make bundle an optional input argument [CLOUDDST-2205] If no bundles are specified, no exception is raised. Instead, iiblib is called with bundles specified as None. --- pubtools/iib/iib_ops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubtools/iib/iib_ops.py b/pubtools/iib/iib_ops.py index 39f3452..95f312f 100644 --- a/pubtools/iib/iib_ops.py +++ b/pubtools/iib/iib_ops.py @@ -131,7 +131,7 @@ ADD_CMD_ARGS[("--bundle",)] = { "group": "IIB service", "help": "//: of bundle", - "required": True, + "required": False, "type": str, "action": "append", } @@ -229,7 +229,7 @@ def _iib_op_main(args, operation=None, items_final_state="PUSHED"): build_details = bundle_op( args.index_image, args.binary_image, - args.bundle if hasattr(args, "bundle") else args.operator, + args.bundle if operation == "add_bundles" else args.operator, args.arch, **extra_args )