diff mercurial/dispatch.py @ 14004:97ed99d1f419

eliminate various naked except clauses
author Idan Kamara <idankk86@gmail.com>
date Sat, 23 Apr 2011 00:51:25 +0300
parents f85c9b0fdb32
children dea93484cf9f
line wrap: on
line diff
--- a/mercurial/dispatch.py	Sun Apr 24 17:52:46 2011 -0500
+++ b/mercurial/dispatch.py	Sat Apr 23 00:51:25 2011 +0300
@@ -133,7 +133,7 @@
         elif hasattr(inst, "reason"):
             try: # usually it is in the form (errno, strerror)
                 reason = inst.reason.args[1]
-            except: # it might be anything, for example a string
+            except AttributeError: # it might be anything, for example a string
                 reason = inst.reason
             ui.warn(_("abort: error: %s\n") % reason)
         elif hasattr(inst, "args") and inst.args[0] == errno.EPIPE: