Exemplo n.º 1
0
 def _getDaysSinceLastEPGUpdate(self):
     path = self._config.getEPGTimestampPath()
     if OSTools.fileExists(path):
         with open(path, 'r') as aFile:
             currentDate=aFile.read()
         try:
             checkDate = datetime.strptime(currentDate,self.EPG_TS_Template)
             delta = datetime.now()-checkDate
             return delta.days
         except ValueError:
             self._log("Error reading EPG Timestamp:"+str(currentDate))
     return -1
Exemplo n.º 2
0
 def readEPGData(self):
     path = self._config.getEPGTimestampPath() 
     if OSTools.fileExists(path):
         OSTools.removeFile(path)
     self._updateEPGData()
Exemplo n.º 3
0
 def _isPolicyChangeRequested(self,markerFile):
     if OSTools.fileExists(markerFile):
         OSTools.removeFile(markerFile)
         return True
     return False