diff --git a/srcloner.py b/srcloner.py index c49d15a..18106b9 100644 --- a/srcloner.py +++ b/srcloner.py @@ -343,10 +343,10 @@ def main(): parser.add_argument('--srid', dest='srid', required=True) for ops in stoneridge.OPERATING_SYSTEMS: parser.add_argument('--%s' % (ops,), dest='operating_systems', - action='append_const', const=ops) + action='append_const', const=ops, default=[]) for nc in stoneridge.NETCONFIGS: parser.add_argument('--%s' % (nc,), dest='netconfigs', - action='append_const', const=nc) + action='append_const', const=nc, default=[]) parser.add_argument('--attempt', dest='attempt', required=True, type=int) parser.add_argument('--ldap', dest='ldap', default='') parser.add_argument('--sha', dest='sha', default='') diff --git a/srdeferrer.py b/srdeferrer.py index ec73c42..f31794b 100644 --- a/srdeferrer.py +++ b/srdeferrer.py @@ -55,10 +55,10 @@ def main(): parser.add_argument('--sha', dest='sha', default='') for nc in stoneridge.NETCONFIGS: parser.add_argument('--%s' % (nc,), dest='netconfigs', - action='append_const', const=nc) + action='append_const', const=nc, default=[]) for ops in stoneridge.OPERATING_SYSTEMS: parser.add_argument('--%s' % (nc,), dest='operating_systems', - action='append_const', const=ops) + action='append_const', const=ops, default=[]) args = parser.parse_args()