summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2010-04-09 15:53:44 +0200
committerSebastian Pipping <sebastian@pipping.org>2010-04-09 15:53:44 +0200
commit5f396e81f8b7c3b40b2461e4dd8ab0d11e400393 (patch)
tree83833b2fef8c83af9c13e9f0aac9fd34578da6bd
parentRename metagen/metagen.py to metagen/main.py (bug #314003) (diff)
downloadmetagen-5f396e81f8b7c3b40b2461e4dd8ab0d11e400393.tar.gz
metagen-5f396e81f8b7c3b40b2461e4dd8ab0d11e400393.tar.bz2
metagen-5f396e81f8b7c3b40b2461e4dd8ab0d11e400393.zip
Add support for --version
-rwxr-xr-xmetagen/main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/metagen/main.py b/metagen/main.py
index d6e3ff6..d69d181 100755
--- a/metagen/main.py
+++ b/metagen/main.py
@@ -23,6 +23,7 @@ from commands import getstatusoutput
from portage.output import red, blue
+from metagen.version import __version__
import metagen.metagenerator
@@ -97,7 +98,7 @@ def validate_xml(my_xml):
if __name__ == '__main__':
- optParser = OptionParser()
+ optParser = OptionParser(version=__version__)
optParser.add_option("-H", action="store", dest="herd", type="string",
help="Name of herd. If not specified, " +
"'no-herd' will be inserted. " +