From 06187ce308dce7b56016e09aa5396e6f1bf60a90 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 9 Sep 2009 15:06:37 +0100 Subject: Avoid Python2.6-isms I'm not entirely up to speed with the new syntax of Python 2.6, but apparently you can now do: func(*args, named_arg=value, **options) and: func(*args, named_arg=value) and Python will happily coalesce named_arg into **options for you. This is not a valid syntax for Python 2.5, though. --- git-bz | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git-bz b/git-bz index 263fec1..a3a42a4 100755 --- a/git-bz +++ b/git-bz @@ -1785,7 +1785,8 @@ def run_push(*args, **kwargs): if global_options.force: options['force'] = True try: - out, err = git.push(*args, _return_stderr=True, **options) + options['_return_stderr']=True + out, err = git.push(*args, **options) except CalledProcessError: return if not dry: @@ -1827,7 +1828,8 @@ def do_push(*args): # We need to add the URLs to the commits before we push # We need to push in order to find out what commits we are pushing # So, we push --dry first - commits = run_push(*args, dry=True) + options = { 'dry' : True } + commits = run_push(*args, **options) if edit_bug(bug, fix_commits=commits): run_push(*args) else: -- cgit v1.2.3