[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.51

Andreas Beckmann anbe at debian.org
Wed May 15 10:09:45 UTC 2013


The following commit has been merged in the master branch:
commit b3377f002ca13494355b8e0733b2db36bcfaa1a3
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun Apr 7 15:32:41 2013 +0200

    dwke: ignore disappearing logfiles
    
    mtime() may fail if the file no longer exists
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>

diff --git a/master-bin/detect_well_known_errors b/master-bin/detect_well_known_errors
index f431df9..2c014d6 100755
--- a/master-bin/detect_well_known_errors
+++ b/master-bin/detect_well_known_errors
@@ -291,6 +291,7 @@ def clean_cache_files( logdict, cachedict, recheck=False, recheck_failed=False,
 
     count = 0
     for pkgspec in cachedict:
+      try:
         if pkgspec not in logdict \
         or (mtime(logdict[pkgspec])>mtime(cachedict[pkgspec]) and not skipnewer)\
         or get_where(logdict[pkgspec]) != get_where(cachedict[pkgspec])\
@@ -302,6 +303,9 @@ def clean_cache_files( logdict, cachedict, recheck=False, recheck_failed=False,
                 count = count + 1
             except OSError:
                 print "Error deleting %s" % cachedict[pkgspec]
+      except IOError:
+	# logfile may have disappeared
+	pass
 
     return( count )
 

-- 
piuparts git repository



More information about the Piuparts-commits mailing list