Mercurial > public > mercurial-scm > hg
diff mercurial/templater.py @ 47857:2b76255a4f74 stable
template: FileNotFoundError is actually a built in exception
However it is python3 only.
Differential Revision: https://phab.mercurial-scm.org/D11310
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 19 Aug 2021 17:46:46 +0200 |
parents | f3b1df44b716 |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/mercurial/templater.py Thu Aug 19 18:04:14 2021 +0200 +++ b/mercurial/templater.py Thu Aug 19 17:46:46 2021 +0200 @@ -71,7 +71,10 @@ import os from .i18n import _ -from .pycompat import getattr +from .pycompat import ( + FileNotFoundError, + getattr, +) from . import ( config, encoding, @@ -856,7 +859,7 @@ subresource = resourceutil.open_resource( b'mercurial.templates', rel ) - except resourceutil.FileNotFoundError: + except FileNotFoundError: subresource = None else: dir = templatedir()