##// END OF EJS Templates
compat: don't reference an exception var inside a lambda
Alejandro Santos -
r9035:8e34f363 default
parent child Browse files
Show More
@@ -1457,7 +1457,10 b' def help_(ui, name=None, with_version=Fa'
1457 try:
1457 try:
1458 aliases, i = cmdutil.findcmd(name, table, False)
1458 aliases, i = cmdutil.findcmd(name, table, False)
1459 except error.AmbiguousCommand, inst:
1459 except error.AmbiguousCommand, inst:
1460 select = lambda c: c.lstrip('^').startswith(inst.args[0])
1460 # py3k fix: except vars can't be used outside the scope of the
1461 # except block, nor can be used inside a lambda. python issue4617
1462 prefix = inst.args[0]
1463 select = lambda c: c.lstrip('^').startswith(prefix)
1461 helplist(_('list of commands:\n\n'), select)
1464 helplist(_('list of commands:\n\n'), select)
1462 return
1465 return
1463
1466
General Comments 0
You need to be logged in to leave comments. Login now