From c0397d6c38cafdf8482aa3530c988c209d502a16 Mon Sep 17 00:00:00 2001 From: jumpmanjay Date: Tue, 30 Aug 2016 15:38:33 -0500 Subject: [PATCH] bugfix in tuner conflict resolution --- Contents/Services/Shared Code/PyHDHR.pys | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Contents/Services/Shared Code/PyHDHR.pys b/Contents/Services/Shared Code/PyHDHR.pys index 53daabb..2355bf3 100644 --- a/Contents/Services/Shared Code/PyHDHR.pys +++ b/Contents/Services/Shared Code/PyHDHR.pys @@ -792,24 +792,15 @@ class PyHDHR: for tunerkey in self.Tuners: chaninfos = self.Tuners[tunerkey].getChannelInfos() if guideno in chaninfos: - usethis = True try: response = urllib2.urlopen(chaninfos[guideno].getURL()+"?duration=1",None,5) - except urllib2.URLError as e: - Log.Critical("urllib2.URLError: "+str(e)) - usethis = False - except urllib2.HTTPError as e: - regx = re.search('HTTP Error 503:',e) + return chaninfos[guideno].getURL() + except Exception as e: + regx = re.search('HTTP Error 503:',str(e)) if regx != None: Log.Debug("All tuners in use on "+self.Tuners[tunerkey].getLocalIP()) else: - Log.Critical("urllib2.HTTPError: "+str(e)) - usethis = False - except Exception as e: - Log.Critical("Exception: "+str(e)) - usethis = False - if usethis == True: - return chaninfos[guideno].getURL() + Log.Critical("Exception: "+str(e)) return None def getRecordedPrograms(self,force=False):