summaryrefslogtreecommitdiffstats
path: root/drcontrol.py
diff options
context:
space:
mode:
authorsebastian.sjoholm <sebastian.sjoholm@gmail.com>2013-01-03 17:13:01 +0000
committersebastian.sjoholm <sebastian.sjoholm@gmail.com>2013-01-03 17:13:01 +0000
commit2ed9b6e06d389ef3781dcc8a15ed59ad29b4687e (patch)
treea9dc978e9465603f4ff98656cb0a90eabbac19b9 /drcontrol.py
parent65b6b9d1631eb16f7cc8e847863e512a9bebcddc (diff)
downloaddrcontrol-2ed9b6e06d389ef3781dcc8a15ed59ad29b4687e.zip
drcontrol-2ed9b6e06d389ef3781dcc8a15ed59ad29b4687e.tar.gz
Fixed bug when comparing that relay is between 1 and 8
Diffstat (limited to 'drcontrol.py')
-rwxr-xr-xdrcontrol.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/drcontrol.py b/drcontrol.py
index 63c10ab..ba8a1e6 100755
--- a/drcontrol.py
+++ b/drcontrol.py
@@ -144,9 +144,9 @@ def set_relay():
try:
with BitBangDevice(cmdarg.device) as bb:
-
+
# Action towards specific relay
- if cmdarg.relay >= 1 and cmdarg.relay <= 8:
+ if int(cmdarg.relay) >= 1 and int(cmdarg.relay) <= 8:
# Turn relay ON
if cmdarg.command == "on":
OpenPOWER on IntegriCloud