Make bool assignment more concise

pull/1199/head
Matthew D. Scholefield 2017-11-09 12:20:55 -06:00
parent 5694b7f645
commit ed1deeb259
1 changed files with 1 additions and 4 deletions

View File

@ -195,10 +195,7 @@ class PreciseHotword(HotWordEngine):
self.cooldown -= 1 self.cooldown -= 1
self.has_found = False self.has_found = False
continue continue
if float(line) > 0.5: self.has_found = float(line) > 0.5
self.has_found = True
else:
self.has_found = False
def update(self, chunk): def update(self, chunk):
self.proc.stdin.write(chunk) self.proc.stdin.write(chunk)