]> git.seodisparate.com - AnotherAURHelper/commitdiff
Handle "FileNotFoundError" when hashing PKGBUILDs
authorStephen Seo <seo.disparate@gmail.com>
Sat, 15 Mar 2025 08:02:28 +0000 (17:02 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sat, 15 Mar 2025 08:02:28 +0000 (17:02 +0900)
Hash is used for option `hash_compare_PKGBUILD`.

update.py

index 972c45a5d4a284030ede8a50796271f3b56a1ca1..959df84768981c7d163f799be0be380a626565ad 100755 (executable)
--- a/update.py
+++ b/update.py
@@ -2685,6 +2685,14 @@ def main():
                 other_state=other_state,
             )
             pkg_state[pkg]["hash_compare_PKGBUILD_hash"] = "error"
+        except FileNotFoundError:
+            log_print(
+                'NOTICE: Failed to get sha256sum of PKGBUILD pkg "{}" (file not found)!'.format(
+                    pkg
+                ),
+                other_state=other_state,
+            )
+            pkg_state[pkg]["hash_compare_PKGBUILD_hash"] = "not_found"
     while i < len(pkg_list):
         if i > furthest_checked:
             furthest_checked = i