Skip to content

Commit

Permalink
support version 0.12.0 of configargparse
Browse files Browse the repository at this point in the history
fixes #4648

(cherry picked from commit 115b215)
  • Loading branch information
Ryan Pineo authored and bmw committed May 13, 2017
1 parent 4be7efb commit de1dbb7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion certbot/util.py
Expand Up @@ -476,7 +476,12 @@ def __call__(self, unused1, unused2, unused3, option_string=None):
sys.stderr.write(
"Use of {0} is deprecated.\n".format(option_string))

configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE.add(ShowWarning)
# In version 0.12.0 ACTION_TYPES_THAT_DONT_NEED_A_VALUE was changed from a set
# to a tuple.
if isinstance(configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE, set):
configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE.add(ShowWarning)
else:
configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE += (ShowWarning,)
add_argument(argument_name, action=ShowWarning,
help=argparse.SUPPRESS, nargs=nargs)

Expand Down

0 comments on commit de1dbb7

Please sign in to comment.