cleanup
authorMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Sat, 26 Sep 2009 21:36:21 +0000 (21:36 +0000)
committerMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Sat, 26 Sep 2009 21:36:21 +0000 (21:36 +0000)
autotimer/src/plugin.py
epgsearch/src/plugin.py
tageditor/src/plugin.py
webinterface/src/WebComponents/Sources/MP.py
webinterface/src/WebComponents/Sources/Timer.py

index bf095f7..fef536c 100644 (file)
@@ -60,7 +60,7 @@ def autostart(reason, **kwargs):
                        # We re-read the config so we won't save wrong information
                        try:
                                autotimer.readXml()
-                       except:
+                       except Exception:
                                # XXX: we should at least dump the error
                                pass
 
index f8ab43d..0c2e506 100644 (file)
@@ -19,12 +19,11 @@ from Plugins.Plugin import PluginDescriptor
 
 # Autostart
 def autostart(reason, **kwargs):
-       if "session" in kwargs:
-               try:
-                       # for blue key activating in EPGSelection
-                       EPGSelectionInit()
-               except:
-                       pass
+       try:
+               # for blue key activating in EPGSelection
+               EPGSelectionInit()
+       except Esception:
+               pass
 
 # Mainfunction
 def main(session, *args, **kwargs):
index b312a8d..717d106 100644 (file)
@@ -20,7 +20,7 @@ def Plugins(**kwargs):
        try:
                from Screens.MovieSelection import setPreferredTagEditor
                setPreferredTagEditor(TagEditor)
-       except:
+       except Exception:
                pass
        return PluginDescriptor(name = "TagEditor", description = _("edit tags..."), where = PluginDescriptor.WHERE_MOVIELIST, fnc = main)
 
index 86817a8..d7c228f 100644 (file)
@@ -34,7 +34,7 @@ class MP(Source):
                        try:
                                test = len(self.session.mediaplayer.playlist)
                                return True
-                       except:
+                       except Exception:
                                pass
 
                # Link inactive, instantiate new MP
index 4ff7aa2..2eeaae9 100644 (file)
@@ -91,7 +91,7 @@ class Timer(Source):
                                if str(timer.service_ref) == str(service_ref) and int(timer.begin) == begin and int(timer.end) == end:
                                        self.recordtimer.removeEntry(timer)
                                        return True, "The timer '%s' has been deleted successfully" % (timer.name)
-               except:
+               except Exception:
                        return ( False, "The timer has NOT been deleted" )
 
                return False, "No matching Timer found"
@@ -173,7 +173,7 @@ class Timer(Source):
                try:
                        service = self.session.nav.getCurrentService()
                        event = service.info().getEvent(0)
-               except:
+               except Exception:
                        print "[Webcomponents.Timer] recordNow Exception!"
 
                begin = time()
@@ -317,7 +317,7 @@ class Timer(Source):
                                                                self.session.nav.RecordTimer.timeChanged(timer)
                                                                print "[WebComponents.Timer] editTimer: Timer changed!"
                                                                return ( True, "Timer %s has been changed!" % (timer.name) )
-                       except:
+                       except Exception:
                                #obviously some value was not good, return an error
                                return ( False, "Changing the timer for '%s' failed!" % name )
 
@@ -332,7 +332,7 @@ class Timer(Source):
                        #add the new timer
                        self.recordtimer.record(timer)
                        return ( True, "Timer added successfully!" )
-               except:
+               except Exception:
                        #something went wrong, most possibly one of the given paramater-values was wrong
                        return ( False, "Could not add timer '%s'!" % name )
 
@@ -415,12 +415,12 @@ class Timer(Source):
 
                        try:
                                timer.append(item.Filename)
-                       except:
+                       except AttributeError:
                                timer.append("")
 
                        try:
                                timer.append(item.next_activation)
-                       except:
+                       except AttributeError:
                                timer.append("")
 
                        if item.eit is not None: