diff options
author | Skip Montanaro <skip@pobox.com> | 2002-03-24 16:34:21 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2002-03-24 16:34:21 (GMT) |
commit | 1ce0073a4e1e5bbc3d710a6c4f1700db6b29827c (patch) | |
tree | 57fb83d8ba926ff729be93098bafd6616688fbb2 /Lib/cmd.py | |
parent | ccbb0edf0ed252d9f0af48c4b60424ab814b1402 (diff) | |
download | cpython-1ce0073a4e1e5bbc3d710a6c4f1700db6b29827c.zip cpython-1ce0073a4e1e5bbc3d710a6c4f1700db6b29827c.tar.gz cpython-1ce0073a4e1e5bbc3d710a6c4f1700db6b29827c.tar.bz2 |
tighten up except - in this context, AttributeError is the only exception
that can be raised - do_help won't be called if arg is not a string
Diffstat (limited to 'Lib/cmd.py')
-rw-r--r-- | Lib/cmd.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -214,13 +214,13 @@ class Cmd: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) - except: + except AttributeError: try: doc=getattr(self, 'do_' + arg).__doc__ if doc: print doc return - except: + except AttributeError: pass print self.nohelp % (arg,) return |