@@ -2002,6 +2002,7 @@ def opts_dict_to_eb_opts(args_dict):
20022002 :return: a list of strings representing command-line options for the 'eb' command
20032003 """
20042004
2005+ allow_multiple_calls = ['amend' , 'try-amend' ]
20052006 _log .debug ("Converting dictionary %s to argument list" % args_dict )
20062007 args = []
20072008 for arg in sorted (args_dict ):
@@ -2011,14 +2012,18 @@ def opts_dict_to_eb_opts(args_dict):
20112012 prefix = '--'
20122013 option = prefix + str (arg )
20132014 value = args_dict [arg ]
2014- if isinstance (value , (list , tuple )):
2015- value = ',' .join (str (x ) for x in value )
20162015
2017- if value in [True , None ]:
2016+ if str (arg ) in allow_multiple_calls :
2017+ if not isinstance (value , (list , tuple )):
2018+ value = [value ]
2019+ args .extend (option + '=' + str (x ) for x in value )
2020+ elif value in [True , None ]:
20182021 args .append (option )
20192022 elif value is False :
20202023 args .append ('--disable-' + option [2 :])
20212024 elif value is not None :
2025+ if isinstance (value , (list , tuple )):
2026+ value = ',' .join (str (x ) for x in value )
20222027 args .append (option + '=' + str (value ))
20232028
20242029 _log .debug ("Converted dictionary %s to argument list %s" % (args_dict , args ))
0 commit comments