Let's be explicit with asserts; there was a bug in histogram
[python_utils.git] / waitable_presence.py
index 8046bdc31f988472900905665a2ef1dcd6dc5102..1d6c3ebdb7bf470ecbeb0d65bb351721a3ba3ec7 100644 (file)
@@ -98,8 +98,8 @@ class WaitablePresenceDetectorWithMemory(state_tracker.WaitableAutomaticStateTra
         if self.someone_is_home is None:
             raise Exception("Too Soon!")
         if self.someone_is_home:
-            assert self.someone_home_since
+            assert self.someone_home_since is not None
             return (True, self.someone_home_since)
         else:
-            assert self.everyone_gone_since
+            assert self.everyone_gone_since is not None
             return (False, self.everyone_gone_since)