Changeset 3271
- Timestamp:
- 12/13/07 19:31:47 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r3260 r3271 117 117 if self.size : 118 118 try : 119 speed = self.size / ( after - self.before)119 speed = self.size / ((after - self.before) + 0.00000000001) # adds an epsilon to avoir an user's problem I can't reproduce... 120 120 except ZeroDivisionError : 121 speed = 1 # Fake value in case of division by zero 121 speed = 1 # Fake value in case of division by zero, shouldn't happen anyway with the epsilon above... 122 122 self.display("\r100.00%%\r \r%s. %s : %.2f %s.\n" \ 123 123 % (_("Done"), _("Average speed"), speed, _("entries per second")))