TypeError: wrapped_note() takes exactly 1 argument (2 given)

Bug #602167 reported by Andrew Schulman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Plugin to Update Remote Trees
Confirmed
High
Unassigned

Bug Description

push_and_update wraps trace.note() by wrapped_note(), with a prototype of

  def wrapped_note(msg):

But this is wrong, because trace.note() has a prototype of

  def note(msg, *args, **kwargs):

This causes the plugin to throw a TypeError exception in some cases. A traceback is below.

The fix is simple. I'm attaching a patch here, which also incorporates the patch in bug #360521.

$ bzr push
bzr: ERROR: exceptions.TypeError: wrapped_warning() takes exactly 1 argument (2 given)

Traceback (most recent call last):
  File "/EPA/usr/stow/bzr/lib64/python2.4/site-packages/bzrlib/commands.py", line 909, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/EPA/usr/stow/bzr/lib64/python2.4/site-packages/bzrlib/commands.py", line 1107, in run_bzr
    ret = run(*run_argv)
  File "/EPA/usr/stow/bzr/lib64/python2.4/site-packages/bzrlib/commands.py", line 687, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/EPA/usr/stow/bzr/lib64/python2.4/site-packages/bzrlib/commands.py", line 702, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/EPA/usr/stow/bzr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 121, in run_simple
    return _do_with_cleanups(
  File "/EPA/usr/stow/bzr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/CEPApqk/.bazaar/plugins/push_and_update/__init__.py", line 75, in run
    return builtins.cmd_push.run(self, *args, **kwargs)
  File "/EPA/usr/stow/bzr/lib64/python2.4/site-packages/bzrlib/builtins.py", line 1125, in run
    more_warning='Uncommitted changes will not be pushed.')
  File "/EPA/usr/stow/bzr/lib64/python2.4/site-packages/bzrlib/decorators.py", line 140, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/EPA/usr/stow/bzr/lib64/python2.4/site-packages/bzrlib/mutabletree.py", line 268, in check_changed_or_out_of_date
    trace.warning('%s', err._format())
TypeError: wrapped_warning() takes exactly 1 argument (2 given)

bzr 2.2b3 on python 2.4.3 (Linux-2.6.18-194.el5-s390x-with-redhat-5.5-Tikanga)
arguments: ['/EPA/usr/bin/bzr', 'push']
encoding: 'ISO-8859-1', fsenc: 'ISO-8859-1', lang: 'en_US'
plugins:
  bash_completion /EPA/usr/lib64/python2.4/site-packages/bzrlib/plugins/bash_completion [2.2b3]
  bisect /EPA/usr/lib/python2.4/site-packages/bzrlib/plugins/bisect [1.1.0.pre.0]
  bzrtools /EPA/usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools [2.2.0]
  launchpad /EPA/usr/lib64/python2.4/site-packages/bzrlib/plugins/launchpad [2.2b3]
  netrc_credential_store /EPA/usr/lib64/python2.4/site-packages/bzrlib/plugins/netrc_credential_store [2.2b3]
  news_merge /EPA/usr/lib64/python2.4/site-packages/bzrlib/plugins/news_merge [2.2b3]
  otisecho /EPA/usr/lib/python2.4/site-packages/bzrlib/plugins/otisecho [0.2]
  pager /home/CEPApqk/.bazaar/plugins/pager [unknown]
  permissions /EPA/usr/lib/python2.4/site-packages/bzrlib/plugins/permissions [0.3]
  push_and_update /home/CEPApqk/.bazaar/plugins/push_and_update [0.2.0dev]
  xmloutput /EPA/usr/lib/python2.4/site-packages/bzrlib/plugins/xmloutput [0.8.6]

Revision history for this message
Andrew Schulman (andrex) wrote :
John A Meinel (jameinel)
Changed in bzr-push-and-update:
importance: Undecided → High
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.