# HG changeset patch # User Martin von Zweigbergk # Date 2020-07-24 05:50:20 # Node ID 653b2a43941247192d6b3f645b01813064cf8755 # Parent 9a308336fe41946b111a9fed17d2cc0341ee4694 formatter: remove now-unnecessary check for file-ness `templater.templatepath()` now returns non-`None` only for files, so the caller doesn't have to check. Differential Revision: https://phab.mercurial-scm.org/D8805 diff --git a/mercurial/formatter.py b/mercurial/formatter.py --- a/mercurial/formatter.py +++ b/mercurial/formatter.py @@ -584,7 +584,7 @@ def lookuptemplate(ui, topic, tmpl): mapname = templater.templatepath( b'map-cmdline.' + tmpl ) or templater.templatepath(tmpl) - if mapname and os.path.isfile(mapname): + if mapname: return templatespec(topic, None, mapname) # perhaps it's a reference to [templates]