Add an entry for "Welwyn's Railways"
[books.alexwlchan.net] / scripts / render_html.py
index 08dffa7..03e89bb 100755 (executable)
@@ -55,6 +55,9 @@ def set_git_timestamps():
 
         revision = git("rev-list", "--max-count=1", "HEAD", path)
 
+        if not revision:
+            continue
+
         timestamp, *_ = git("show", "--pretty=format:%ai", "--abbrev-commit", revision).splitlines()
         modified_time = datetime.datetime.strptime(timestamp, "%Y-%m-%d %H:%M:%S %z").timestamp()