wireproto: avoid naked excepts
authorMatt Mackall <mpm@selenic.com>
Tue, 22 Mar 2011 21:26:19 -0500
changeset 13726 378522bdc059
parent 13724 fe57046e9448
child 13727 ce47a0c10224
wireproto: avoid naked excepts
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Tue Mar 22 09:22:29 2011 +0100
+++ b/mercurial/wireproto.py	Tue Mar 22 21:26:19 2011 -0500
@@ -37,7 +37,7 @@
         d = self._call("heads")
         try:
             return decodelist(d[:-1])
-        except:
+        except ValueError:
             self._abort(error.ResponseError(_("unexpected response:"), d))
 
     def known(self, nodes):
@@ -45,7 +45,7 @@
         d = self._call("known", nodes=n)
         try:
             return [bool(int(f)) for f in d]
-        except:
+        except ValueError:
             self._abort(error.ResponseError(_("unexpected response:"), d))
 
     def branchmap(self):
@@ -67,7 +67,7 @@
         try:
             br = [tuple(decodelist(b)) for b in d.splitlines()]
             return br
-        except:
+        except ValueError:
             self._abort(error.ResponseError(_("unexpected response:"), d))
 
     def between(self, pairs):
@@ -78,7 +78,7 @@
             d = self._call("between", pairs=n)
             try:
                 r.extend(l and decodelist(l) or [] for l in d.splitlines())
-            except:
+            except ValueError:
                 self._abort(error.ResponseError(_("unexpected response:"), d))
         return r