Skip to content
Snippets Groups Projects
Commit 5392bf25 authored by Matt Harbison's avatar Matt Harbison
Browse files

hooklib: force an exception wrapped by errors.Abort to bytestr

Flagged by PyCharm and pytype.
parent 5f006f78
No related branches found
No related tags found
2 merge requests!485branching: merge default into stable,!379Add pytype coverage to the extensions
......@@ -32,7 +32,10 @@
pycompat,
registrar,
)
from mercurial.utils import dateutil
from mercurial.utils import (
dateutil,
stringutil,
)
from .. import notify
configtable = {}
......@@ -98,7 +101,7 @@
try:
msg = mail.parsebytes(data)
except emailerrors.MessageParseError as inst:
raise error.Abort(inst)
raise error.Abort(stringutil.forcebytestr(inst))
msg['In-reply-to'] = notify.messageid(ctx, domain, messageidseed)
msg['Message-Id'] = notify.messageid(
......
......@@ -31,7 +31,10 @@
pycompat,
registrar,
)
from mercurial.utils import dateutil
from mercurial.utils import (
dateutil,
stringutil,
)
from .. import notify
configtable = {}
......@@ -97,7 +100,7 @@
try:
msg = mail.parsebytes(data)
except emailerrors.MessageParseError as inst:
raise error.Abort(inst)
raise error.Abort(stringutil.forcebytestr(inst))
msg['In-reply-to'] = notify.messageid(ctx, domain, messageidseed)
msg['Message-Id'] = notify.messageid(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment