Peter Palfrader pushed to branch master at snapshot / snapshot


Commits:
121cb707 by Peter Palfrader at 2025-04-12T13:07:40+02:00
process-farm-update: incidcate hash errors by exit code != 0

- - - - -


1 changed file:

- mirror/process-farm-update


Changes:

=====================================
mirror/process-farm-update
=====================================
@@ -96,7 +96,7 @@ def move_file_with_fallback(src, dst):
     os.unlink(src)
 
 
-
+rc = 0
 for fn in os.listdir('.'):
     if fn == "meta": continue
 
@@ -104,6 +104,7 @@ for fn in os.listdir('.'):
     if fn != h:
         sys.stderr.write("Warning: File %s has unexpected hash value %s.  
Ignoring\n"%(fn, h))
         os.unlink(fn)
+        rc = 1
         continue
 
     target = make_path(h)
@@ -111,6 +112,8 @@ for fn in os.listdir('.'):
     if options.verbose: print("%s -> %s"%(fn,target))
     move_file_with_fallback(fn, target)
 
+sys.exit(rc)
+
 # vim:set et:
 # vim:set ts=4:
 # vim:set shiftwidth=4:



View it on GitLab: 
https://salsa.debian.org/snapshot-team/snapshot/-/commit/121cb707c87884e8c46d994dd7c9a9a9df4e171f

-- 
View it on GitLab: 
https://salsa.debian.org/snapshot-team/snapshot/-/commit/121cb707c87884e8c46d994dd7c9a9a9df4e171f
You're receiving this email because of your account on salsa.debian.org.


Reply via email to