mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 18:32:14 +02:00
filter-repo: workaround python<2.7.9 exec bug
Python issue 21591 will cause SyntaxError messages to by thrown if using python versions prior to 2.7.9. Use the workaround identified in the bug report: use the exec statement instead of the exec function, even if this will need to be reverted for python3. Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
068dd66b70
commit
4d0264ab72
@ -2621,8 +2621,8 @@ class RepoFilter(object):
|
|||||||
|
|
||||||
def _handle_arg_callbacks(self):
|
def _handle_arg_callbacks(self):
|
||||||
def make_callback(argname, str):
|
def make_callback(argname, str):
|
||||||
exec('def callback({}):\n'.format(argname)+
|
exec 'def callback({}):\n'.format(argname)+\
|
||||||
' '+'\n '.join(str.splitlines()), globals())
|
' '+'\n '.join(str.splitlines()) in globals()
|
||||||
return callback #namespace['callback']
|
return callback #namespace['callback']
|
||||||
def handle(type):
|
def handle(type):
|
||||||
callback_field = '_{}_callback'.format(type)
|
callback_field = '_{}_callback'.format(type)
|
||||||
|
Loading…
Reference in New Issue
Block a user