projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Let's be explicit with asserts; there was a bug in histogram
[python_utils.git]
/
waitable_presence.py
diff --git
a/waitable_presence.py
b/waitable_presence.py
index 8046bdc31f988472900905665a2ef1dcd6dc5102..1d6c3ebdb7bf470ecbeb0d65bb351721a3ba3ec7 100644
(file)
--- a/
waitable_presence.py
+++ b/
waitable_presence.py
@@
-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:
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:
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)
return (False, self.everyone_gone_since)