UnboundLocalError: local variable 'key' referenced before assignment

Bruce Cran bruce at cran.org.uk
Wed Dec 18 00:02:11 UTC 2013


I'm seeing a few stack traces in the apache error_log files (we're 
running hg 2.7.2 with hgweb.wsgi) - one looks like 
http://bz.selenic.com/show_bug.cgi?id=3953, but I'm wondering if the 
following is likely to be the same problem or a different bug?

Traceback (most recent call last):
   File 
"/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgwebdir_mod.py", line 
153, in __call__
     return self.run_wsgi(req)
   File 
"/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgwebdir_mod.py", line 
217, in run_wsgi
     repo = hg.repository(self.ui, real)
   File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 112, in 
repository
     peer = _peerorrepo(ui, path, create)
   File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 102, in 
_peerorrepo
     obj = _peerlookup(path).instance(ui, path, create)
   File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 
2448, in instance
     return localrepository(ui, util.urllocalpath(path), create)
   File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 
176, in __init__
     extensions.loadall(self.ui)
   File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 
114, in loadall
     extsetup(ui)
   File "/usr/local/lib/python2.7/dist-packages/hgext/mq.py", line 3583, 
in extsetup
     dotable(commands.table)
   File "/usr/local/lib/python2.7/dist-packages/hgext/mq.py", line 3580, 
in dotable
     entry = extensions.wrapcommand(cmdtable, cmd, mqcommand)
   File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 
150, in wrapcommand
     table[key] = tuple(newentry)
UnboundLocalError: local variable 'key' referenced before assignment

-- 
Bruce



More information about the Mercurial mailing list