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
2f088886
Commit
2f088886
authored
Feb 04, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some typos
parent
b31e04fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
parsers.py
domotika/parsers.py
+3
-3
No files found.
domotika/parsers.py
View file @
2f088886
...
@@ -157,7 +157,7 @@ def statusParser(trigger, sun, restype='string'):
...
@@ -157,7 +157,7 @@ def statusParser(trigger, sun, restype='string'):
else
:
else
:
if
not
reverse
:
if
not
reverse
:
ret
=
doQuery
(
"SELECT MAX(active) from timers WHERE DMDOMAIN(timer_name, '"
+
str
(
tid
[
0
])
+
"')=1"
)
# at least one active?
ret
=
doQuery
(
"SELECT MAX(active) from timers WHERE DMDOMAIN(timer_name, '"
+
str
(
tid
[
0
])
+
"')=1"
)
# at least one active?
else
else
:
ret
=
doQuery
(
"SELECT MIN(active) from timers WHERE DMDOMAIN(timer_name, '"
+
str
(
tid
[
0
])
+
"')=1"
,
reverse
=
True
)
# at least one off?
ret
=
doQuery
(
"SELECT MIN(active) from timers WHERE DMDOMAIN(timer_name, '"
+
str
(
tid
[
0
])
+
"')=1"
,
reverse
=
True
)
# at least one off?
except
:
except
:
pass
pass
...
@@ -178,13 +178,13 @@ def statusParser(trigger, sun, restype='string'):
...
@@ -178,13 +178,13 @@ def statusParser(trigger, sun, restype='string'):
else
:
else
:
if
not
reverse
:
if
not
reverse
:
ret
=
doQuery
(
"SELECT MAX(active) from actions WHERE DMDOMAIN(action_name, '"
+
str
(
tid
[
0
])
+
"')=1"
)
# at least one active?
ret
=
doQuery
(
"SELECT MAX(active) from actions WHERE DMDOMAIN(action_name, '"
+
str
(
tid
[
0
])
+
"')=1"
)
# at least one active?
else
else
:
ret
=
doQuery
(
"SELECT MIN(active) from actions WHERE DMDOMAIN(action_name, '"
+
str
(
tid
[
0
])
+
"')=1"
,
reverse
=
True
)
# at least one off?
ret
=
doQuery
(
"SELECT MIN(active) from actions WHERE DMDOMAIN(action_name, '"
+
str
(
tid
[
0
])
+
"')=1"
,
reverse
=
True
)
# at least one off?
except
:
except
:
pass
pass
elif
(
trigger
.
startswith
(
"BOARDSTATUS "
)
or
trigger
.
startswith
(
"BOARDSTATUS:"
)
# DEPRECATED, USE BOARDACTIVE
elif
(
trigger
.
startswith
(
"BOARDSTATUS "
)
or
trigger
.
startswith
(
"BOARDSTATUS:"
)
or
# DEPRECATED, USE BOARDACTIVE
trigger
.
startswith
(
"BOARDACTIVE "
)
or
trigger
.
startswith
(
"BOARDACTIVE:"
)):
trigger
.
startswith
(
"BOARDACTIVE "
)
or
trigger
.
startswith
(
"BOARDACTIVE:"
)):
bname
=
trigger
[
12
:]
.
split
()
bname
=
trigger
[
12
:]
.
split
()
if
len
(
bname
)
>
0
:
if
len
(
bname
)
>
0
:
...
...
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