[Piuparts-commits] [piuparts] 15/17: dwke: catch another exception on file disappearance

Holger Levsen holger at alioth.debian.org
Wed Nov 6 09:45:54 UTC 2013


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 882c514012835893c968241c7f29ff9d8c4182b8
Author: Andreas Beckmann <anbe at debian.org>
Date:   Wed Nov 6 01:15:17 2013 +0100

    dwke: catch another exception on file disappearance
    
    get_mtime() may throw OSError
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 master-bin/detect_well_known_errors.py |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/master-bin/detect_well_known_errors.py b/master-bin/detect_well_known_errors.py
index ec2d4df..57f7869 100755
--- a/master-bin/detect_well_known_errors.py
+++ b/master-bin/detect_well_known_errors.py
@@ -322,13 +322,9 @@ def clean_cache_files(logdict, cachedict, recheck=False, recheck_failed=False,
             or get_where(logdict[pkgspec]) != get_where(cachedict[pkgspec])\
             or recheck\
             or (recheck_failed and not get_where(cachedict[pkgspec]) in ['pass']):
-
-                try:
-                    os.remove(cachedict[pkgspec])
-                    count = count + 1
-                except OSError:
-                    print "Error deleting %s" % cachedict[pkgspec]
-        except IOError:
+                os.remove(cachedict[pkgspec])
+                count = count + 1
+        except (IOError, OSError):
             # logfile may have disappeared
             pass
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list