# HG changeset patch # User Daniel Dourvaris # Date 2019-12-04 19:54:31 # Node ID 938f856a631422ee032531b8fac59f7017fd2ba2 # Parent 921973ad438514d0070c9cd2b52f081a5b759f44 mercurial: fix deprecation warnings on using exc.message attribute. diff --git a/rhodecode/lib/vcs/backends/hg/repository.py b/rhodecode/lib/vcs/backends/hg/repository.py --- a/rhodecode/lib/vcs/backends/hg/repository.py +++ b/rhodecode/lib/vcs/backends/hg/repository.py @@ -649,7 +649,7 @@ class MercurialRepository(BaseRepository # The rebase-abort may raise another exception which 'hides' # the original one, therefore we log it here. log.exception('Error while rebasing shadow repo during merge.') - if 'unresolved conflicts' in e.message: + if 'unresolved conflicts' in safe_str(e): unresolved = self._remote.get_unresolved_files() log.debug('unresolved files: %s', unresolved) @@ -675,7 +675,7 @@ class MercurialRepository(BaseRepository # The merge-abort may raise another exception which 'hides' # the original one, therefore we log it here. log.exception('Error while merging shadow repo during merge.') - if 'unresolved merge conflicts' in e.message: + if 'unresolved merge conflicts' in safe_str(e): unresolved = self._remote.get_unresolved_files() log.debug('unresolved files: %s', unresolved)