changeset 45260:653b2a439412

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
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 23 Jul 2020 22:50:20 -0700
parents 9a308336fe41
children 28840ef52f71
files mercurial/formatter.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/formatter.py	Thu Jul 23 22:47:55 2020 -0700
+++ b/mercurial/formatter.py	Thu Jul 23 22:50:20 2020 -0700
@@ -584,7 +584,7 @@
         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]