comparison mercurial/commands.py @ 4738:c41a404ac387

Handle extensions with defined but empty cmdtable
author Brendan Cully <brendan@kublai.com>
date Thu, 28 Jun 2007 21:16:25 -0700
parents eadfaa9ec487
children 44e17f5029d0
comparison
equal deleted inserted replaced
4737:2ececafa5859 4738:c41a404ac387
1393 ui.status('\n') 1393 ui.status('\n')
1394 1394
1395 try: 1395 try:
1396 ct = mod.cmdtable 1396 ct = mod.cmdtable
1397 except AttributeError: 1397 except AttributeError:
1398 ct = None
1399 if not ct:
1398 ui.status(_('no commands defined\n')) 1400 ui.status(_('no commands defined\n'))
1399 return 1401 return
1400 1402
1401 ui.status(_('list of commands:\n\n')) 1403 ui.status(_('list of commands:\n\n'))
1402 modcmds = dict.fromkeys([c.split('|', 1)[0] for c in ct]) 1404 modcmds = dict.fromkeys([c.split('|', 1)[0] for c in ct])