# HG changeset patch # User Denis Laxalde # Date 2019-11-04 08:52:13 # Node ID cf3bf3b03445b79997905a4aafb6c4ae14cf7c3f # Parent 9a43cef9ec59f711f1f697430aafd569ca9e2b31 py3: use mail.parsebytes() in gnuarch catlog parser We drop 'catlogparser' attribute now unused. diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py --- a/hgext/convert/gnuarch.py +++ b/hgext/convert/gnuarch.py @@ -7,7 +7,6 @@ # GNU General Public License version 2 or any later version. from __future__ import absolute_import -import email.parser as emailparser import os import shutil import stat @@ -17,6 +16,7 @@ from mercurial.i18n import _ from mercurial import ( encoding, error, + mail, pycompat, util, ) @@ -69,7 +69,6 @@ class gnuarch_source(common.converter_so self.changes = {} self.parents = {} self.tags = {} - self.catlogparser = emailparser.Parser() self.encoding = encoding.encoding self.archives = [] @@ -299,7 +298,7 @@ class gnuarch_source(common.converter_so def _parsecatlog(self, data, rev): try: - catlog = self.catlogparser.parsestr(data) + catlog = mail.parsebytes(data) # Commit date self.changes[rev].date = dateutil.datestr(