Commit 545df278 authored by Denis Laxalde's avatar Denis Laxalde
Browse files

py3: fix several TypeError formatting bytes with an exception object

--HG--
branch : stable
parent 88b816a9d990
Pipeline #1645 passed with stage
in 4 minutes and 32 seconds
......@@ -33,6 +33,7 @@ from mercurial import (
util,
)
from mercurial.i18n import _
from mercurial.utils import stringutil
from . import (
compat,
......@@ -447,7 +448,9 @@ class _obshashcache(obscache.dualsourcecache):
for r in ranges:
self._data.pop(r, None)
except (sqlite3.DatabaseError, sqlite3.OperationalError) as exc:
repo.ui.log(b'evoext-cache', b'error while updating obshashrange cache: %s' % exc)
repo.ui.log(b'evoext-cache',
b'error while updating obshashrange cache: %s'
% stringutil.forcebytestr(exc))
del self._updating
return
......@@ -551,8 +554,11 @@ class _obshashcache(obscache.dualsourcecache):
if r'_con' in vars(self):
del self._con
self._new.clear()
repo.ui.log(b'evoext-cache', b'error while saving new data: %s' % exc)
repo.ui.debug(b'evoext-cache: error while saving new data: %s' % exc)
repo.ui.log(b'evoext-cache',
b'error while saving new data: %s'
% stringutil.forcebytestr(exc))
repo.ui.debug(b'evoext-cache: error while saving new data: %s'
% stringutil.forcebytestr(exc))
def _trysave(self, repo):
if self._con is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment