[pitivi] Replace catch-all try/except: statement, trap the expected exception.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] Replace catch-all try/except: statement, trap the expected exception.
- Date: Thu, 25 Jun 2009 09:32:20 +0000 (UTC)
commit 0a5f9b43d7ac560bb8d8904fad2ae3fcf09a86ce
Author: Alessandro Decina <alessandro d gmail com>
Date: Wed Jun 24 16:31:18 2009 +0200
Replace catch-all try/except: statement, trap the expected exception.
pitivi/ui/mainwindow.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index b15cd57..4185bf4 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -53,6 +53,7 @@ from pitivi.action import ViewAction
from pitivi.settings import GlobalSettings
from pitivi.receiver import receiver, handler
import pitivi.formatters.format as formatter
+from pitivi.sourcelist import SourceListError
if HAVE_GCONF:
D_G_INTERFACE = "/desktop/gnome/interface"
@@ -972,7 +973,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
# Use factory from our source list if we have the given uri
try:
fact = self.project.sources.getUri(uri)
- except:
+ except SourceListError:
from pitivi.factories.file import FileSourceFactory
fact = FileSourceFactory(uri)
self._viewFactory(fact)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]