projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccbb0ed
)
tighten up except - in this context, AttributeError is the only exception
author
Skip Montanaro
<skip@pobox.com>
Sun, 24 Mar 2002 16:34:21 +0000
(16:34 +0000)
committer
Skip Montanaro
<skip@pobox.com>
Sun, 24 Mar 2002 16:34:21 +0000
(16:34 +0000)
that can be raised - do_help won't be called if arg is not a string
Lib/cmd.py
patch
|
blob
|
history
diff --git
a/Lib/cmd.py
b/Lib/cmd.py
index 5f955a7c10b1c5e5664e7145d8b002d90ee0d681..5bbf4bcc7c8e4e9b833b246771f83fc1b9c1695c 100644
(file)
--- a/
Lib/cmd.py
+++ b/
Lib/cmd.py
@@
-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