Just output version information and exit.

Signed-off-by: FUJITA Tomonori <[email protected]>
---
 bin/ryu-manager |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/bin/ryu-manager b/bin/ryu-manager
index bb94557..cfa56a0 100755
--- a/bin/ryu-manager
+++ b/bin/ryu-manager
@@ -27,6 +27,7 @@ monkey.patch_all()
 from ryu import log
 log.early_init_log(logging.DEBUG)
 
+from ryu import version
 from ryu import utils
 from ryu.app import wsgi
 from ryu.base.app_manager import AppManager
@@ -34,6 +35,7 @@ from ryu.controller import controller
 
 
 FLAGS = gflags.FLAGS
+gflags.DEFINE_bool('version', False, 'output version information and exit')
 gflags.DEFINE_multistring('app_lists',
                           [],
                           'application module name to run')
@@ -42,6 +44,11 @@ gflags.DEFINE_multistring('app_lists',
 def main():
     utils.find_flagfile()
     args = FLAGS(sys.argv)
+
+    if FLAGS.version:
+        print 'ryu-manager %s' % version
+        sys.exit(0)
+
     log.init_log()
 
     if len(args) > 1:
-- 
1.7.4.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to