##// END OF EJS Templates
py3: use util.forcebytestr() to convert IOErrors to bytes...
Pulkit Goyal -
r36580:247e9bf4 default
parent child Browse files
Show More
@@ -52,7 +52,7 b' class remotestore(basestore.basestore):'
52 except IOError as e:
52 except IOError as e:
53 raise error.Abort(
53 raise error.Abort(
54 _('remotestore: could not open file %s: %s')
54 _('remotestore: could not open file %s: %s')
55 % (filename, str(e)))
55 % (filename, util.forcebytestr(e)))
56
56
57 def _getfile(self, tmpfile, filename, hash):
57 def _getfile(self, tmpfile, filename, hash):
58 try:
58 try:
@@ -60,7 +60,8 b' class remotestore(basestore.basestore):'
60 except urlerr.httperror as e:
60 except urlerr.httperror as e:
61 # 401s get converted to error.Aborts; everything else is fine being
61 # 401s get converted to error.Aborts; everything else is fine being
62 # turned into a StoreError
62 # turned into a StoreError
63 raise basestore.StoreError(filename, hash, self.url, str(e))
63 raise basestore.StoreError(filename, hash, self.url,
64 util.forcebytestr(e))
64 except urlerr.urlerror as e:
65 except urlerr.urlerror as e:
65 # This usually indicates a connection problem, so don't
66 # This usually indicates a connection problem, so don't
66 # keep trying with the other files... they will probably
67 # keep trying with the other files... they will probably
@@ -68,7 +69,8 b' class remotestore(basestore.basestore):'
68 raise error.Abort('%s: %s' %
69 raise error.Abort('%s: %s' %
69 (util.hidepassword(self.url), e.reason))
70 (util.hidepassword(self.url), e.reason))
70 except IOError as e:
71 except IOError as e:
71 raise basestore.StoreError(filename, hash, self.url, str(e))
72 raise basestore.StoreError(filename, hash, self.url,
73 util.forcebytestr(e))
72
74
73 return lfutil.copyandhash(chunks, tmpfile)
75 return lfutil.copyandhash(chunks, tmpfile)
74
76
General Comments 0
You need to be logged in to leave comments. Login now