]> git.ipfire.org Git - thirdparty/google/fonts.git/commitdiff
Fix knowledge_graph CI. (#5436)
authorNathan Williams <williamsnathan@google.com>
Wed, 19 Oct 2022 22:29:21 +0000 (15:29 -0700)
committerGitHub <noreply@github.com>
Wed, 19 Oct 2022 22:29:21 +0000 (15:29 -0700)
.github/workflows/knowledge_graph.py

index d37e057c6beccaa1bf5b871e9059de9c2e70ac37..c6a7070c941ddb194ef942c78060a35ce1af1ebc 100644 (file)
@@ -257,10 +257,10 @@ def _check_image_files(knowledge: KnowledgeContent) -> bool:
         has_view_box = "viewBox" in root.attributes
         has_width_and_height = "width" in root.attributes and "height" in root.attributes
         if not has_view_box and not has_width_and_height:
-            print("Must specify viewBox and/or width+height on <svg>:", image_file.relative_to(knowledge_dir))
+            print("Must specify viewBox and/or width+height on <svg>:", image_file.relative_to(knowledge.knowledge_dir))
             result = False
         if image_file.suffix != ".svg" and image_file.stat().st_size > MAX_IMAGE_SIZE_KB * 1024:
-            print("File exceeds max size of %s KB:" % MAX_IMAGE_SIZE_KB, image_file.relative_to(knowledge_dir))
+            print("File exceeds max size of %s KB:" % MAX_IMAGE_SIZE_KB, image_file.relative_to(knowledge.knowledge_dir))
             result = False
     return result