diff options
Diffstat (limited to 'hgext/convert/darcs.py')
-rw-r--r-- | hgext/convert/darcs.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hgext/convert/darcs.py b/hgext/convert/darcs.py index b10a533..38d79ba 100644 --- a/hgext/convert/darcs.py +++ b/hgext/convert/darcs.py @@ -24,7 +24,7 @@ except ImportError: try: from elementtree.ElementTree import ElementTree, XMLParser except ImportError: - pass + ElementTree = None class darcs_source(converter_source, commandline): def __init__(self, ui, path, rev=None): @@ -42,7 +42,7 @@ class darcs_source(converter_source, commandline): raise util.Abort(_('darcs version 2.1 or newer needed (found %r)') % version) - if "ElementTree" not in globals(): + if ElementTree is None: raise util.Abort(_("Python ElementTree module is not available")) self.path = os.path.realpath(path) @@ -139,7 +139,7 @@ class darcs_source(converter_source, commandline): # etree can return unicode objects for name, comment, and author, # so recode() is used to ensure str objects are emitted. return commit(author=self.recode(elt.get('author')), - date=util.datestr(date, '%Y-%m-%d %H:%M:%S %1%2'), + date=util.datestr(date), desc=self.recode(desc).strip(), parents=self.parents[rev]) |