diff mbox series

[ovs-dev,RFC,4/5] ovn-detrace: expose version as global variable

Message ID 20211014164130.606220-5-amorenoz@redhat.com
State RFC
Headers show
Series Facilitate external use of ovn-detrace | expand

Commit Message

Adrián Moreno Oct. 14, 2021, 4:41 p.m. UTC
That way importers can check it to determine whether a particular
feature exists or not.

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
---
 utilities/ovn_detrace.py.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/utilities/ovn_detrace.py.in b/utilities/ovn_detrace.py.in
index d26efbd16..570119d5a 100755
--- a/utilities/ovn_detrace.py.in
+++ b/utilities/ovn_detrace.py.in
@@ -36,7 +36,7 @@  except Exception:
 
 
 argv0 = sys.argv[0]
-
+version = "@VERSION@"
 
 def usage():
     print("""\
@@ -415,7 +415,7 @@  def main():
         if key in ['-h', '--help']:
             usage()
         elif key in ['-V', '--version']:
-            print("%s (OVN) @VERSION@" % argv0)
+            print("%s (OVN) %s" % (argv0, version))
         elif key in ['--ovnsb']:
             ovnsb_db = value
         elif key in ['--ovnnb']: