Mercurial > hg
comparison mercurial/repair.py @ 36702:f659a407e5ee
py3: use util.forcebytestr instead of str to convert error messages
Differential Revision: https://phab.mercurial-scm.org/D2649
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 04 Mar 2018 22:37:41 +0530 |
parents | 128dd940bedc |
children | 17692fefc8f2 |
comparison
equal
deleted
inserted
replaced
36701:d77c3b023393 | 36702:f659a407e5ee |
---|---|
233 try: | 233 try: |
234 undovfs.unlink(undofile) | 234 undovfs.unlink(undofile) |
235 except OSError as e: | 235 except OSError as e: |
236 if e.errno != errno.ENOENT: | 236 if e.errno != errno.ENOENT: |
237 ui.warn(_('error removing %s: %s\n') % | 237 ui.warn(_('error removing %s: %s\n') % |
238 (undovfs.join(undofile), str(e))) | 238 (undovfs.join(undofile), util.forcebytestr(e))) |
239 | 239 |
240 except: # re-raises | 240 except: # re-raises |
241 if backupfile: | 241 if backupfile: |
242 ui.warn(_("strip failed, backup bundle stored in '%s'\n") | 242 ui.warn(_("strip failed, backup bundle stored in '%s'\n") |
243 % vfs.join(backupfile)) | 243 % vfs.join(backupfile)) |