Author: duncan
Date: Fri Sep 29 13:14:55 2006
New Revision: 8268

Modified:
   branches/rel-1-5/freevo/src/helpers/tv_grab.py

Log:
[ 1567705 ] Patch reports a tv_grab failure
Patch applied


Modified: branches/rel-1-5/freevo/src/helpers/tv_grab.py
==============================================================================
--- branches/rel-1-5/freevo/src/helpers/tv_grab.py      (original)
+++ branches/rel-1-5/freevo/src/helpers/tv_grab.py      Fri Sep 29 13:14:55 2006
@@ -63,11 +63,11 @@
 
     print 'Grabbing listings.'
     xmltvtmp = '/tmp/TV.xml.tmp'
-    os.system('%s --output %s --days %s' % ( config.XMLTV_GRABBER, 
+    ec = os.system('%s --output %s --days %s' % ( config.XMLTV_GRABBER, 
                                              xmltvtmp,
                                              config.XMLTV_DAYS ))
 
-    if os.path.exists(xmltvtmp):
+    if os.path.exists(xmltvtmp) and ec == 0:
         if os.path.isfile(config.XMLTV_SORT):
             print 'Sorting listings.'
             os.system('%s --output %s %s' % ( config.XMLTV_SORT,
@@ -84,7 +84,15 @@
 
         import tv.epg_xmltv
         tv.epg_xmltv.get_guide(XMLTV_FILE=xmltvtmp)
-
+    else:
+        sys.stderr.write("ERROR: xmltv grabbing failed; "
+                         "%s returned exit code %d.\n" %
+                         (config.XMLTV_GRABBER, ec >> 8))
+        sys.stderr.write("  If you did not change your system, it's likely 
that "
+                         "the site being grabbed did.\n  You might want to try 
"
+                         "whether updating your xmltv helps in that case:\n"
+                         "    http://www.xmltv.org/\n";)
+        sys.exit(1)
 
 if __name__ == '__main__':
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to