Commit 4e9ac582 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix bad variable reuse.

parent a84f0f42
...@@ -490,13 +490,13 @@ class AggregateSiteUrl(argparse.Action): ...@@ -490,13 +490,13 @@ class AggregateSiteUrl(argparse.Action):
'--skip-base': None, '--skip-base': None,
} }
def __call__(self, parser, namespace, values, option_string=None): def __call__(self, parser, namespace, values, option_string=None):
action = self.__argument_to_aggregator[option_string] action = base_action = self.__argument_to_aggregator[option_string]
dest = getattr(namespace, self.dest) dest = getattr(namespace, self.dest)
for value in values: for value in values:
match = re.compile(value).match match = re.compile(value).match
if action is not None: if base_action is not None:
match_suffix = re.compile(value + '(?P<suffix>.*)').match match_suffix = re.compile(value + '(?P<suffix>.*)').match
action = partial(action, action = partial(base_action,
suffix=lambda x: match_suffix(x).group('suffix')) suffix=lambda x: match_suffix(x).group('suffix'))
dest.append((value, match, action)) dest.append((value, match, action))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment