# HG changeset patch # User Matt Harbison # Date 2023-01-06 17:16:04 # Node ID 668fb0dcb179622ac17af84713f2101afdf343a8 # Parent 2ac60a71c240ed534cfc37435872f98c5084e2e0 convert: stop passing str to the dateutil API in darcs I'm sure there's a bunch more stuff in here that's broken, but this was flagged by pytype. diff --git a/hgext/convert/darcs.py b/hgext/convert/darcs.py --- a/hgext/convert/darcs.py +++ b/hgext/convert/darcs.py @@ -143,7 +143,7 @@ class darcs_source(common.converter_sour def getcommit(self, rev): elt = self.changes[rev] dateformat = b'%a %b %d %H:%M:%S %Z %Y' - date = dateutil.strdate(elt.get('local_date'), dateformat) + date = dateutil.strdate(self.recode(elt.get('local_date')), dateformat) desc = elt.findtext('name') + '\n' + elt.findtext('comment', '') # etree can return unicode objects for name, comment, and author, # so recode() is used to ensure str objects are emitted.