[Piuparts-commits] [piuparts] 01/06: p-r: ignore OSError while archiving disappeared logfile

Holger Levsen holger at layer-acht.org
Tue Oct 3 22:50:01 UTC 2017


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

holger pushed a commit to branch develop
in repository piuparts.

commit 2338fa1431aeec1ba0627f76d41c6b998fe9f6a2
Author: Andreas Beckmann <anbe at debian.org>
Date:   Tue Sep 19 17:12:03 2017 +0200

    p-r: ignore OSError while archiving disappeared logfile
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 piuparts-report.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/piuparts-report.py b/piuparts-report.py
index a95eb02..eb199da 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -1486,7 +1486,10 @@ class Section:
         archivedir = os.path.join("archive", vdir)
         if not os.path.exists(archivedir):
             os.makedirs(archivedir)
-        os.rename(os.path.join(vdir, log), os.path.join("archive", vdir, log))
+        try:
+            os.rename(os.path.join(vdir, log), os.path.join("archive", vdir, log))
+        except OSError:
+            logging.debug("OSError while archiving %s/%s" % (vdir, log))
 
     def cleanup_removed_packages(self, logs_by_dir):
         vdirs = logs_by_dir.keys()

-- 
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