diff --git a/swift/obj/auditor.py b/swift/obj/auditor.py index 218a96a83a..89644a6782 100644 --- a/swift/obj/auditor.py +++ b/swift/obj/auditor.py @@ -105,7 +105,8 @@ class AuditorWorker(object): self.errors = 0 self.bytes_processed = 0 time_auditing += (now - loop_time) - elapsed = time.time() - begin + # Avoid divide by zero during very short runs + elapsed = (time.time() - begin) or 0.000001 self.logger.info(_( 'Object audit (%(type)s) "%(mode)s" mode ' 'completed: %(elapsed).02fs. Total quarantined: %(quars)d, '