Commit 341f7b43 authored by nextime's avatar nextime

Fix bool return

parent cd1ccf75
...@@ -52,6 +52,25 @@ def statusParser(trigger, sun, restype='string'): ...@@ -52,6 +52,25 @@ def statusParser(trigger, sun, restype='string'):
def parseReturn(qres, reverse=False): def parseReturn(qres, reverse=False):
qr=False qr=False
if type(qres).__name__=='str' and restype=='bool':
if qres in ['0','','false','False']:
if reverse:
return True
return False
else:
if reverse:
return False
return True
if type(qres).__name__ in ['int', 'bool'] and restype=='bool':
if qres:
if reverse:
return False
return True
if reverse:
return True
return False
if type(qres).__name__=='int' and restype=='int': if type(qres).__name__=='int' and restype=='int':
qr=qres qr=qres
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment