projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7031a69
)
storage.py: improve some precondition() error messages
author
Brian Warner
<warner@allmydata.com>
Fri, 10 Oct 2008 01:14:25 +0000
(18:14 -0700)
committer
Brian Warner
<warner@allmydata.com>
Fri, 10 Oct 2008 01:14:25 +0000
(18:14 -0700)
src/allmydata/storage.py
patch
|
blob
|
history
diff --git
a/src/allmydata/storage.py
b/src/allmydata/storage.py
index 29b4019dd6b258c1b705fa99b1290a84ab672d7c..f86dc3bf08728a517ac62508dda409a8470ef985 100644
(file)
--- a/
src/allmydata/storage.py
+++ b/
src/allmydata/storage.py
@@
-118,8
+118,8
@@
class ShareFile:
def write_share_data(self, offset, data):
length = len(data)
- precondition(offset >= 0)
- precondition(offset+length <= self._size)
+ precondition(offset >= 0
, offset
)
+ precondition(offset+length <= self._size
, offset+length, self._size
)
f = open(self.home, 'rb+')
real_offset = self._data_offset+offset
f.seek(real_offset)