Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
domotikad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
domotika
domotikad
Commits
341f7b43
Commit
341f7b43
authored
Aug 11, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bool return
parent
cd1ccf75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
parsers.py
domotika/parsers.py
+19
-0
No files found.
domotika/parsers.py
View file @
341f7b43
...
...
@@ -52,6 +52,25 @@ def statusParser(trigger, sun, restype='string'):
def
parseReturn
(
qres
,
reverse
=
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'
:
qr
=
qres
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment