fix atomic write test

the interrupt() now shouldn't be getting called extra times
after the file has been read completely
This commit is contained in:
Steven Berler 2011-07-07 12:11:41 -07:00
parent d65a33421a
commit 9279998aa6

View file

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