storage.py: improve some precondition() error messages

This commit is contained in:
Brian Warner 2008-10-09 18:14:25 -07:00
parent 7031a69bee
commit c289a9c31b
1 changed files with 2 additions and 2 deletions

View File

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