From: Fred Drake Date: Fri, 11 May 2001 19:21:41 +0000 (+0000) Subject: When guarding an import, only catch ImportError. X-Git-Tag: v2.2a3~1808 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8187615e281c409516b64eda5f7a5a56274e5a1;p=python When guarding an import, only catch ImportError. --- diff --git a/Lib/pstats.py b/Lib/pstats.py index 19478d6f3e..b46727d50b 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -533,7 +533,7 @@ if __name__ == '__main__': import cmd try: import readline - except: + except ImportError: pass class ProfileBrowser(cmd.Cmd):