[pitivi: 6/18] Allow specifying -i with no MEDIA_FILES, to directly create a new project.



commit c6dc1ec232fc5d1e66cdc353a37432e7a17de600
Author: Alex BÄ?luÈ? <alexandru balut gmail com>
Date:   Mon Dec 13 10:52:07 2010 +0100

    Allow specifying -i with no MEDIA_FILES, to directly create a new project.

 pitivi/application.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index cfcfcd9..0de5260 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -412,7 +412,7 @@ def _parse_options(argv):
     parser = OptionParser(
             usage=_("""
     %prog [PROJECT_FILE]               # Start the video editor.
-    %prog -i [-a] MEDIA_FILE1 [...]    # Start the editor and create a project.
+    %prog -i [-a] [MEDIA_FILE1 ...]    # Start the editor and create a project.
     %prog PROJECT_FILE -r OUTPUT_FILE  # Render a project.
     %prog PROJECT_FILE -p              # Preview a project."""))
 
@@ -445,8 +445,8 @@ def _parse_options(argv):
 
     # Validate args.
     if options.import_sources:
-        if not args:
-            parser.error("-i requires at least one MEDIA_FILE")
+        # When no MEDIA_FILE is specified, we just create a new project.
+        pass
     elif options.render_output:
         if len(args) != 1:
             parser.error("-r requires exactly one PROJECT_FILE")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]