[SCM] GUI front-end for Debian Live. branch, master, updated. c379815e15c63b40da3fe755e290f11bf7459a66
Chris Lamb
chris at chris-lamb.co.uk
Tue Jul 8 19:51:33 UTC 2008
The following commit has been merged in the master branch:
commit c379815e15c63b40da3fe755e290f11bf7459a66
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date: Tue Jul 8 20:51:16 2008 +0100
Show version when called with '--version'. Thanks to W. Martin Borgert.
(NB. Only partly closes the bug mentioned.)
Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>
diff --git a/LiveMagic/__init__.py b/LiveMagic/__init__.py
index 2e9ad90..7f60e50 100644
--- a/LiveMagic/__init__.py
+++ b/LiveMagic/__init__.py
@@ -3,10 +3,12 @@ import gtk
import pygtk
pygtk.require('2.0')
-import sys
+import optparse
from LiveMagic import views, controllers
+__version__ = '0.4'
+
class LiveMagic(object):
def __init__(self, args):
@@ -15,7 +17,10 @@ class LiveMagic(object):
except RuntimeError, e:
sys.exit('E: %s. Exiting.' % e)
- c = controllers.Controller(sys.argv[1:])
+ optparser = optparse.OptionParser(version=__version__)
+ _, args = optparser.parse_args()
+
+ c = controllers.Controller(args)
v = views.View(c)
c.ready()
diff --git a/debian/changelog b/debian/changelog
index b2fcfcc..24aa7ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ live-magic (0.4) UNRELEASED; urgency=low
* Add Depends: on gksu (Closes: #476071)
* Don't segfault when DISPLAY is not set. Thanks to W. Martin Borgert
(debacle at debian.org>) for the patch. (Closes: #489904)
+ * Show version when called with '--version'. Thanks to W. Martin Borgert
+ (debacle at debian.org>) for the patch. (Closes: #450782)
-- Chris Lamb <chris at chris-lamb.co.uk> Mon, 14 Jan 2008 18:36:43 +0000
--
GUI front-end for Debian Live.
More information about the debian-live-changes
mailing list