From c289a9c31bb3364865fe76673ca2f274af972301 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 9 Oct 2008 18:14:25 -0700 Subject: [PATCH] storage.py: improve some precondition() error messages --- src/allmydata/storage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allmydata/storage.py b/src/allmydata/storage.py index 29b4019d..f86dc3bf 100644 --- 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) -- 2.45.2