##// END OF EJS Templates
wireproto: avoid naked excepts
Matt Mackall -
r13726:378522bd default
parent child Browse files
Show More
@@ -37,7 +37,7 b' class wirerepository(repo.repository):'
37 d = self._call("heads")
37 d = self._call("heads")
38 try:
38 try:
39 return decodelist(d[:-1])
39 return decodelist(d[:-1])
40 except:
40 except ValueError:
41 self._abort(error.ResponseError(_("unexpected response:"), d))
41 self._abort(error.ResponseError(_("unexpected response:"), d))
42
42
43 def known(self, nodes):
43 def known(self, nodes):
@@ -45,7 +45,7 b' class wirerepository(repo.repository):'
45 d = self._call("known", nodes=n)
45 d = self._call("known", nodes=n)
46 try:
46 try:
47 return [bool(int(f)) for f in d]
47 return [bool(int(f)) for f in d]
48 except:
48 except ValueError:
49 self._abort(error.ResponseError(_("unexpected response:"), d))
49 self._abort(error.ResponseError(_("unexpected response:"), d))
50
50
51 def branchmap(self):
51 def branchmap(self):
@@ -67,7 +67,7 b' class wirerepository(repo.repository):'
67 try:
67 try:
68 br = [tuple(decodelist(b)) for b in d.splitlines()]
68 br = [tuple(decodelist(b)) for b in d.splitlines()]
69 return br
69 return br
70 except:
70 except ValueError:
71 self._abort(error.ResponseError(_("unexpected response:"), d))
71 self._abort(error.ResponseError(_("unexpected response:"), d))
72
72
73 def between(self, pairs):
73 def between(self, pairs):
@@ -78,7 +78,7 b' class wirerepository(repo.repository):'
78 d = self._call("between", pairs=n)
78 d = self._call("between", pairs=n)
79 try:
79 try:
80 r.extend(l and decodelist(l) or [] for l in d.splitlines())
80 r.extend(l and decodelist(l) or [] for l in d.splitlines())
81 except:
81 except ValueError:
82 self._abort(error.ResponseError(_("unexpected response:"), d))
82 self._abort(error.ResponseError(_("unexpected response:"), d))
83 return r
83 return r
84
84
General Comments 0
You need to be logged in to leave comments. Login now