[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.45-75-g5fca52d
Andreas Beckmann
debian at abeckmann.de
Thu Jul 26 12:13:20 UTC 2012
The following commit has been merged in the piatti branch:
commit c91b7b79da27865cce218ab226df561f458a347d
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Wed Jun 27 23:32:36 2012 +0200
logdb: don't use assert on functions with side effects
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index b962e3a..acc5291 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -198,7 +198,8 @@ class LogDB:
def create(self, subdir, package, version, contents):
(fd, temp_name) = tempfile.mkstemp(dir=subdir)
- assert os.write(fd, contents) == len(contents)
+ if os.write(fd, contents) != len(contents):
+ raise Exception("Partial write?")
os.close(fd)
# tempfile.mkstemp sets the file mode to be readable only by owner.
--
piuparts git repository
More information about the Piuparts-commits
mailing list