Fix up test gold standard references for new output
[arvados.git] / tools / crunchstat-summary / crunchstat_summary / summarizer.py
index 305042b2b036efd11479a89a6c57d73b5d9aa555..e962ced31404bfe26a7da36d034871941663ef23 100644 (file)
@@ -443,9 +443,9 @@ class Summarizer(object):
     def _recommend_temp_disk(self):
         """Recommend decreasing temp disk if utilization < 50%"""
         total = float(self.job_tot['statfs']['total'])
-        utilization = (float(self.job_tot['statfs']['used']) / total)
+        utilization = (float(self.job_tot['statfs']['used']) / total) if total > 0 else 0.0
 
-        if utilization < 50.8:
+        if utilization < 50.8 and total > 0:
             yield (
                 '#!! {} max temp disk utilization was {:.0f}% of {:.0f} MiB -- '
                 'consider reducing "tmpdirMin" and/or "outdirMin"'