Fix an error when running the render script in a clean checkout
authorAlex Chan <alex@alexwlchan.net>
Thu, 6 Feb 2020 15:24:48 +0000 (15:24 +0000)
committerAlex Chan <alex@alexwlchan.net>
Thu, 6 Feb 2020 15:24:48 +0000 (15:24 +0000)
Because the _html directory doesn't exist yet, trying to create
_html/thumbnails would fail without `parents=True`.

scripts/render_html.py

index 870a398..b427ef4 100755 (executable)
@@ -173,7 +173,7 @@ def render_individual_review(env, *, review_entry):
 
 
 def _create_new_thumbnail(src_path, dst_path):
-    dst_path.parent.mkdir(exist_ok=True)
+    dst_path.parent.mkdir(exist_ok=True, parents=True)
 
     im = Image.open(src_path)