changeset 13726:378522bdc059

wireproto: avoid naked excepts
author Matt Mackall <mpm@selenic.com>
date Tue, 22 Mar 2011 21:26:19 -0500
parents fe57046e9448
children ce47a0c10224
files mercurial/wireproto.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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