[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-755-ga3ab31d
Andreas Beckmann
debian at abeckmann.de
Mon Jun 18 11:37:57 UTC 2012
The following commit has been merged in the piatti branch:
commit 09a3a781cdd003fb3c43e5cf9ec92e18c9ea8150
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sun Jun 17 09:28:35 2012 +0200
p-r: fix another race with logfiles being removed
report: background:
exists?
remove
stat
OSError
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/debian/changelog b/debian/changelog
index df5f15e..d4d6ed3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -108,6 +108,7 @@ piuparts (0.45) UNRELEASED; urgency=low
- detect_well_known_errors: Add bug links if bugs are known.
- New known problem: "packages have been kept back".
- Report rdeps and blocking counts in all error state reports.
+ - Fix another race with logfiles disappearing while copying.
* piuparts-analyze.py:
- Don't report further bugs/versions if we found a match.
- Classify logs with bugs filed into /bugged/ or /affected/.
diff --git a/piuparts-report.py b/piuparts-report.py
index 03ecac9..5fd337e 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -504,10 +504,14 @@ def find_files_with_suffix(dir,suffix):
def update_file(source, target):
if os.path.exists(target):
- aa = os.stat(source)
- bb = os.stat(target)
- if aa.st_size == bb.st_size and aa.st_mtime < bb.st_mtime:
- return
+ try:
+ aa = os.stat(source)
+ bb = os.stat(target)
+ except OSError:
+ pass
+ else:
+ if aa.st_size == bb.st_size and aa.st_mtime < bb.st_mtime:
+ return
try:
shutil.copyfile(source, target)
except IOError as (errno, strerror):
--
piuparts git repository
More information about the Piuparts-commits
mailing list