89
89
if self.finished: raise StopIteration
91
91
filename = "%s.%d" % (self.prefix, self.current_index)
93
93
outfp = open(filename, "wb")
95
95
if not self.write_volume(outfp): # end of input
97
97
if self.current_index == 1: # special case first index
100
100
os.rename(filename, self.prefix)
102
102
else: self.current_index += 1