[pitivi] Prevent starting PiTiVi with an invalid project file argument
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Prevent starting PiTiVi with an invalid project file argument
- Date: Fri, 13 Jul 2012 03:35:26 +0000 (UTC)
commit 9626708b0b38adeeddcc93166cd4ffc0536a58db
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Thu Jul 12 23:34:59 2012 -0400
Prevent starting PiTiVi with an invalid project file argument
Fixes bug #679711
pitivi/application.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index bd343a2..46b88be 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -399,7 +399,11 @@ class ProjectLoaderGuiPitivi(FullGuiPitivi):
def __init__(self, project_filename, debug=False):
FullGuiPitivi.__init__(self, debug)
- self._loadProject(project_filename)
+ if not os.path.exists(project_filename):
+ self.error("Project file does not exist: %s" % project_filename)
+ sys.exit(1)
+ else:
+ self._loadProject(project_filename)
class StartupWizardGuiPitivi(FullGuiPitivi):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]