# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-02-26 18:20:30 # Node ID a918c996a881a6cd51c49d6375c17b452ede9bef # Parent 39c9f339b6921207633f929439b49b70f7487476 py3: use encoding.strtolocal() to convert str to bytes Differential Revision: https://phab.mercurial-scm.org/D2459 diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -85,6 +85,7 @@ from mercurial.i18n import _ from mercurial import ( cmdutil, commands, + encoding, error, formatter, hg, @@ -669,7 +670,8 @@ def email(ui, repo, *revs, **opts): start_time = util.makedate() def genmsgid(id): - return '<%s.%d@%s>' % (id[:20], int(start_time[0]), socket.getfqdn()) + return '<%s.%d@%s>' % (id[:20], int(start_time[0]), + encoding.strtolocal(socket.getfqdn())) # deprecated config: patchbomb.from sender = (opts.get('from') or ui.config('email', 'from') or