From: Oto Šťáva Date: Mon, 12 Dec 2022 07:35:48 +0000 (+0100) Subject: doc/conf.py: tolerate complete non-existence of Git X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f945f6cf1e0aed862f01cfa7ac49b58a6d844d0a;p=thirdparty%2Fknot-resolver.git doc/conf.py: tolerate complete non-existence of Git --- diff --git a/doc/conf.py b/doc/conf.py index d26383d5f..9bc897ae4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -40,8 +40,10 @@ if not commit_year_got: commit_year = commit_date.year commit_year_src = 'Git' commit_year_got = True - except subprocess.CalledProcessError as e: - pass # Kind of expected, just silently fall back to '.kr-vcs-info' + except subprocess.CalledProcessError: + pass # .git probably does not exist, silently fall back to '.kr-vcs-info' + except FileNotFoundError: + pass # Git is probably not installed, silently fall back to '.kr-vcs-info' if not commit_year_got: try: