summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2009-09-09 15:06:37 +0100
committerOwen W. Taylor <otaylor@fishsoup.net>2009-09-09 10:24:12 -0400
commit06187ce308dce7b56016e09aa5396e6f1bf60a90 (patch)
treefdd13e1f6c7133aa034e16bb2ca2199be475ade6
parentef827f1b1aa0c0779a6238452e105040858d11c3 (diff)
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.
-rwxr-xr-xgit-bz6
1 files 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: