diff --git a/scripts/lib/buildstats.py b/scripts/lib/buildstats.py
index c9a238bb127..9f8c9061505 100644
--- a/scripts/lib/buildstats.py
+++ b/scripts/lib/buildstats.py
@@ -239,6 +239,7 @@ class BuildStats(dict):
         """
         Parse the top-level build_stats file for build-wide start and duration.
         """
+        start = elapsed = 0
         with open(path) as fobj:
             for line in fobj.readlines():
                 key, val = line.split(':', 1)
