Hi!

I just digged in my last CVS checkout of Freevo 2.0 and found some patches 
that were not yet applied to SVN.

There is a tiny cleanup for the idlebar logo.py (unused variable, wrong init) 
and an xmltv exitcode checking patch which could be applied as-is.  I will 
hold back other (UI) patches as long as the UI code is not using kaa.display 
yet.

-- 
Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo
Index: ui/src/plugins/idlebar/logo.py
===================================================================
--- ui/src/plugins/idlebar/logo.py	(Revision 7954)
+++ ui/src/plugins/idlebar/logo.py	(Arbeitskopie)
@@ -44,8 +44,7 @@
     def __init__(self, image=None):
         IdleBarPlugin.__init__(self)
         self.image  = image
-        self.file   = file
-        self.object = None
+        self.file   = None
 
 
     def draw(self, width, height):
Index: ui/src/helpers/tv_grab.py
===================================================================
--- ui/src/helpers/tv_grab.py	(Revision 7954)
+++ ui/src/helpers/tv_grab.py	(Arbeitskopie)
@@ -60,10 +60,10 @@
 
     print 'Grabbing listings using XMLTV.'
     xmltvtmp = '/tmp/TV.xml.tmp'
-    os.system('%s --output %s --days %s' % ( config.XMLTV_GRABBER, 
-                                             xmltvtmp,
-                                             config.XMLTV_DAYS ))
-    if os.path.exists(xmltvtmp):
+    ec = os.system('%s --output %s --days %s' % ( config.XMLTV_GRABBER,
+                                                  xmltvtmp,
+                                                  config.XMLTV_DAYS ))
+    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,
@@ -78,6 +78,15 @@
         print 'Loading data into epgdb, this may take a while'
 
         shutil.move(xmltvtmp, config.XMLTV_FILE)
+    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)
 
     kaa.epg.update('xmltv', config.XMLTV_FILE)
 

Attachment: pgpaX7VX1CXK5.pgp
Description: PGP signature

Reply via email to