When guarding an import, only catch ImportError.
diff --git a/Lib/pstats.py b/Lib/pstats.py
index 19478d6..b46727d 100644
--- a/Lib/pstats.py
+++ b/Lib/pstats.py
@@ -533,7 +533,7 @@
     import cmd
     try:
         import readline
-    except:
+    except ImportError:
         pass
 
     class ProfileBrowser(cmd.Cmd):