mercurial/templater.py
branchstable
changeset 47836 f3b1df44b716
parent 47830 981cef5188c3
child 47857 2b76255a4f74
--- a/mercurial/templater.py	Wed Aug 18 01:10:40 2021 +0200
+++ b/mercurial/templater.py	Wed Aug 18 01:41:02 2021 +0200
@@ -852,9 +852,12 @@
         if not subresource:
             if pycompat.ossep not in rel:
                 abs = rel
-                subresource = resourceutil.open_resource(
-                    b'mercurial.templates', rel
-                )
+                try:
+                    subresource = resourceutil.open_resource(
+                        b'mercurial.templates', rel
+                    )
+                except resourceutil.FileNotFoundError:
+                    subresource = None
             else:
                 dir = templatedir()
                 if dir: