Skip to content

Commit

Permalink
Fix SplitAndExtend constructor to work for Python 2 and 3 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
AvlWx2014 committed Aug 11, 2021
1 parent 7a3061c commit d3ec452
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pubtools/_pulp/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ class SplitAndExtend(Action):
https://docs.python.org/3/library/argparse.html#action
"""

def __init__(self, *args, split_on=",", **kwargs):
def __init__(self, *args, **kwargs):
self.__split_on = kwargs.pop("split_on", ",")
super(SplitAndExtend, self).__init__(*args, **kwargs)
self.__split_on = split_on

def __call__(self, _, namespace, values, options=None):
items = getattr(namespace, self.dest, None) or []
Expand Down

0 comments on commit d3ec452

Please sign in to comment.