diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2009-09-09 15:06:37 +0100 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2009-09-09 10:24:12 -0400 |
commit | 06187ce308dce7b56016e09aa5396e6f1bf60a90 (patch) | |
tree | fdd13e1f6c7133aa034e16bb2ca2199be475ade6 | |
parent | ef827f1b1aa0c0779a6238452e105040858d11c3 (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-x | git-bz | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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: |