summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/autocard.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2013-10-23 00:26:24 (GMT)
committerJames Meyer <james.meyer@operamail.com>2013-10-23 00:26:24 (GMT)
commitda25f596344b30020862f0d32e5ae2d78efabfc5 (patch)
treefd37bf6f361c583d02b48f3e1c5b2f33002207a8 /abs/core/LinHES-config/autocard.py
parentd32dd9c0df66e8896953de4334a97461042e851c (diff)
downloadlinhes_pkgbuild-da25f596344b30020862f0d32e5ae2d78efabfc5.zip
linhes_pkgbuild-da25f596344b30020862f0d32e5ae2d78efabfc5.tar.gz
linhes_pkgbuild-da25f596344b30020862f0d32e5ae2d78efabfc5.tar.bz2
LinHES-config: autocard.py
increase default timeout for discovering infinitv to 15 seconds Added some extra try/except to autocard to avoid abnormal aborting.
Diffstat (limited to 'abs/core/LinHES-config/autocard.py')
-rwxr-xr-x[-rw-r--r--]abs/core/LinHES-config/autocard.py44
1 files changed, 25 insertions, 19 deletions
diff --git a/abs/core/LinHES-config/autocard.py b/abs/core/LinHES-config/autocard.py
index c461714..19563a4 100644..100755
--- a/abs/core/LinHES-config/autocard.py
+++ b/abs/core/LinHES-config/autocard.py
@@ -766,20 +766,21 @@ def gather_ceton(tuner_list):
command="/usr/MythVantage/bin/discover_infinitv.py %s" %iface
results=os.popen(command,'r')
lines=results.readlines()
- #try:
- if lines[0].strip().split()[0] == "no":
- print "Ceton not detected"
- else:
- for line in lines:
- #Found InfiniTV. Location URL: http://192.168.200.1/description.xml
- #cetondevice = line.strip().split()[0]
- cetonip = line.strip().split("/")[2]
-
- tuners = [0,1,2,3]
- for t in tuners:
- tuner_list.append(infinitv_tuner(t,cetonip))
- #except:
- # print "Error finding Ceton InfinitTV"
+ try:
+ print lines
+ if lines[0].strip().split()[0].lower() == "no":
+ print "Ceton not detected on %s" %iface
+ else:
+ for line in lines:
+ #Found InfiniTV. Location URL: http://192.168.200.1/description.xml
+ #cetondevice = line.strip().split()[0]
+ cetonip = line.strip().split("/")[2]
+
+ tuners = [0,1,2,3]
+ for t in tuners:
+ tuner_list.append(infinitv_tuner(t,cetonip))
+ except:
+ print "Error finding Ceton InfinitTV on %s" %iface
return tuner_list
@@ -816,11 +817,16 @@ def find_ceton_network_list():
for i in netinterfaces:
if i.startswith("ctn") or i.startswith("usb"):
#configure and start ctn network
- config_ctn_network(i)
-
- #read ip
- ctnip.append(netifaces.ifaddresses(i)
- [netifaces.AF_INET][0]['addr'])
+ try:
+ config_ctn_network(i)
+
+ #read ip
+ ctnip.append(netifaces.ifaddresses(i)
+ [netifaces.AF_INET][0]['addr'])
+ except:
+ print " * Error scanning network interface %s" %i
+ print " * Please check that the interface is ready and configured"
+
return ctnip
#--end of linhes specific