mercurial/commands.py
changeset 9035 8e34f363dd77
parent 9031 3b76321aa0de
child 9036 32e678f9045f
equal deleted inserted replaced
9034:8429062de8d3 9035:8e34f363dd77
  1455             ui.write('\n')
  1455             ui.write('\n')
  1456 
  1456 
  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 
  1464         # synopsis
  1467         # synopsis
  1465         if len(i) > 2:
  1468         if len(i) > 2: