[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][snapshot-team/snapshot][master] process-farm-update: incidcate hash errors by exit code != 0



Title: GitLab

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:

Changes:

  • mirror/process-farm-update
    ... ... @@ -96,7 +96,7 @@ def move_file_with_fallback(src, dst):
    96 96
         os.unlink(src)
    
    97 97
     
    
    98 98
     
    
    99
    -
    
    99
    +rc = 0
    
    100 100
     for fn in os.listdir('.'):
    
    101 101
         if fn == "meta": continue
    
    102 102
     
    
    ... ... @@ -104,6 +104,7 @@ for fn in os.listdir('.'):
    104 104
         if fn != h:
    
    105 105
             sys.stderr.write("Warning: File %s has unexpected hash value %s.  Ignoring\n"%(fn, h))
    
    106 106
             os.unlink(fn)
    
    107
    +        rc = 1
    
    107 108
             continue
    
    108 109
     
    
    109 110
         target = make_path(h)
    
    ... ... @@ -111,6 +112,8 @@ for fn in os.listdir('.'):
    111 112
         if options.verbose: print("%s -> %s"%(fn,target))
    
    112 113
         move_file_with_fallback(fn, target)
    
    113 114
     
    
    115
    +sys.exit(rc)
    
    116
    +
    
    114 117
     # vim:set et:
    
    115 118
     # vim:set ts=4:
    
    116 119
     # vim:set shiftwidth=4:


  • Reply to: