From 9279998aa6349632213132774f1538d912db5b91 Mon Sep 17 00:00:00 2001 From: Steven Berler Date: Thu, 7 Jul 2011 12:11:41 -0700 Subject: [PATCH] fix atomic write test the interrupt() now shouldn't be getting called extra times after the file has been read completely --- test_s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_s3.py b/test_s3.py index 18156ec..8258dff 100644 --- a/test_s3.py +++ b/test_s3.py @@ -1026,7 +1026,7 @@ def _test_atomic_write(file_size): self.offset += count # Sneaky! do stuff before we return (the last time) - if self.interrupt != None and self.offset == self.size: + if self.interrupt != None and self.offset == self.size and count > 0: self.interrupt() return self.char*count