Mercurial > public > mercurial-scm > hg
comparison mercurial/url.py @ 36422:04c319a07c7b
py3: hunt down str(exception) instances and use util.forcebytestr
I decided to grep around for \sstr\( and see what low-hanging fruit
that showed me. This was part of that hunt. That grep pattern still
has some things worth exploring.
Differential Revision: https://phab.mercurial-scm.org/D2440
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 25 Feb 2018 23:08:41 -0500 |
parents | 548316560a05 |
children | 23d12524a202 |
comparison
equal
deleted
inserted
replaced
36421:1df7e7b8558e | 36422:04c319a07c7b |
---|---|
447 cookiejar = util.cookielib.MozillaCookieJar(cookiefile) | 447 cookiejar = util.cookielib.MozillaCookieJar(cookiefile) |
448 cookiejar.load() | 448 cookiejar.load() |
449 self.cookiejar = cookiejar | 449 self.cookiejar = cookiejar |
450 except util.cookielib.LoadError as e: | 450 except util.cookielib.LoadError as e: |
451 ui.warn(_('(error loading cookie file %s: %s; continuing without ' | 451 ui.warn(_('(error loading cookie file %s: %s; continuing without ' |
452 'cookies)\n') % (cookiefile, str(e))) | 452 'cookies)\n') % (cookiefile, util.forcebytestr(e))) |
453 | 453 |
454 def http_request(self, request): | 454 def http_request(self, request): |
455 if self.cookiejar: | 455 if self.cookiejar: |
456 self.cookiejar.add_cookie_header(request) | 456 self.cookiejar.add_cookie_header(request) |
457 | 457 |