← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 704: Fixed some bugs with the new "--version" argument. It was located in the wrong place, and caused...

 

------------------------------------------------------------
revno: 704
fixes bug: https://launchpad.net/bugs/956664
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Sun 2012-09-09 22:01:20 -0500
message:
  Fixed some bugs with the new "--version" argument.  It was located in the wrong place, and caused OpenShot to break if it was not able to import the first location it tried.
modified:
  bin/openshot
  openshot/openshot.py


--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main

Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'bin/openshot'
--- bin/openshot	2012-09-04 20:13:16 +0000
+++ bin/openshot	2012-09-10 03:01:20 +0000
@@ -49,11 +49,6 @@
 # we should be able to import openshot and call the main() method
 
 try:
-	if( "--version" in sys.argv ):
-		from openshot.classes import info
-		print "OpenShot version %s" % info.SETUP['version']	
-		exit()
-	
 	# RUN OPENSHOT (from the openshot/bin folder)
 	from openshot import main
 	main()

=== modified file 'openshot/openshot.py'
--- openshot/openshot.py	2011-08-09 21:10:47 +0000
+++ openshot/openshot.py	2012-09-10 03:01:20 +0000
@@ -39,6 +39,11 @@
 def main():
 	""""Initialise common settings and check the operating environment before starting the application."""
 
+	# Display version and exit (if requested)
+	if( "--version" in sys.argv ):
+		print "OpenShot version %s" % info.VERSION
+		exit()
+
 	print "--------------------------------"
 	print "   OpenShot (version %s)" % info.SETUP['version']
 	print "--------------------------------"