changeset 2:9310e2ff7e17

reader: Actually throw ValueError from _last_stable.
author Paul Fisher <paul@pfish.zone>
date Fri, 27 Sep 2019 21:37:23 -0400
parents b52600fade25
children d961c8a93d6b
files weatherlog/reader.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/weatherlog/reader.py	Fri Sep 27 21:36:16 2019 -0400
+++ b/weatherlog/reader.py	Fri Sep 27 21:37:23 2019 -0400
@@ -109,6 +109,7 @@
                 bucket_vals.append(v)
             if len(bucket_vals) == count:
                 return sorted(bucket_vals)[count / 2]
+    raise ValueError('No stable value.')
 
 
 def _is_reasonable_temp(temp: float) -> bool: