summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_ir.py
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config/mv_ir.py')
-rwxr-xr-xabs/core/LinHES-config/mv_ir.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/abs/core/LinHES-config/mv_ir.py b/abs/core/LinHES-config/mv_ir.py
index a5e3f3b..f3be276 100755
--- a/abs/core/LinHES-config/mv_ir.py
+++ b/abs/core/LinHES-config/mv_ir.py
@@ -294,36 +294,36 @@ def setup_ir(systemconfig, data_config):
return rc
logging.info("____Start of IR____")
- if systemconfig["Remotetype"] == "tinker":
+ if systemconfig.get("Remotetype") == "tinker":
logging.info(" Tinker mode detected")
else:
- if not systemconfig["HostBlasterType"]:
+ if not systemconfig.get("HostBlasterType"):
HostBlasterType = "unknown"
Hostnumblaster = "0"
else:
- HostBlasterType = systemconfig["HostBlasterType"]
- Hostnumblaster = systemconfig["Hostnumblaster"]
+ HostBlasterType = systemconfig.get("HostBlasterType")
+ Hostnumblaster = systemconfig.get("Hostnumblaster")
- if systemconfig["HostBlasterType"] == "pvr150":
+ if systemconfig.get("HostBlasterType") == "pvr150":
remotetype = "hauppauge-blaster"
logging.debug(" pvr150 blaster selected, setting remote to hauppauge-blaster")
else:
- remotetype = systemconfig["Remotetype"]
+ remotetype = systemconfig.get("Remotetype")
- setup_ir_remote(remotetype,systemconfig["TEMPLATES"])
+ setup_ir_remote(remotetype,systemconfig.get("TEMPLATES"))
setup_lirc_links(data_config.MYTHHOME)
- if systemconfig["ReceiverType"]:
- setup_ir_receiver(systemconfig["ReceiverType"],
- systemconfig["TEMPLATES"],
- systemconfig["HDHRlirc_device"],
- systemconfig["mythip"])
+ if systemconfig.get("ReceiverType"):
+ setup_ir_receiver(systemconfig.get("ReceiverType"),
+ systemconfig.get("TEMPLATES"),
+ systemconfig.get("HDHRlirc_device"),
+ systemconfig.get("mythip"))
else:
- setup_ir_receiver("unknown", systemconfig["TEMPLATES"],'','127.0.0.1')
+ setup_ir_receiver("unknown", systemconfig.get("TEMPLATES"),'','127.0.0.1')
unload_all_lirc()
setup_blaster_proto(HostBlasterType,
Hostnumblaster,
- systemconfig["TEMPLATES"],
+ systemconfig.get("TEMPLATES"),
systemconfig)
setup_blaster_transmiter(HostBlasterType)
cmd = "load-modules-mythvantage.sh"
@@ -333,10 +333,10 @@ def setup_ir(systemconfig, data_config):
cmd="sv start lircd"
mv_common.runcmd(cmd)
rc = [ True , True ]
- if systemconfig["LCDtype"]:
- setup_lcd(systemconfig["LCDtype"],
- systemconfig["TEMPLATES"],
- systemconfig["Remotetype"])
+ if systemconfig.get("LCDtype"):
+ setup_lcd(systemconfig.get("LCDtype"),
+ systemconfig.get("TEMPLATES"),
+ systemconfig.get("Remotetype"))
else:
logging.debug(" LCD not defined")
logging.info("__End IR\n")