diff options
Diffstat (limited to 'abs/core/LinHES-config/autocard.py')
-rwxr-xr-x[-rw-r--r--] | abs/core/LinHES-config/autocard.py | 44 |
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 |