8000 add option to see the version · codeplay/cf-python-client@e4d4af6 · GitHub
[go: up one dir, main page]

Skip to content

Commit e4d4af6

Browse files
author
Romain Dartigues
committed
add option to see the version
1 parent e7532b4 commit e4d4af6

File tree

1 file changed

+2
-0
lines changed
  • src/python/cloudfoundry_client

1 file changed

+2
-0
lines changed

src/python/cloudfoundry_client/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from requests.exceptions import ConnectionError
1111

12+
from cloudfoundry_client import __version__
1213
from cloudfoundry_client.client import CloudFoundryClient
1314
from cloudfoundry_client.entities import InvalidStatusCode
1415

@@ -168,6 +169,7 @@ def main():
168169
description.append('')
169170

170171
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter)
172+
parser.add_argument('-V', '--version', action='version', version=__version__)
171173
subparsers = parser.add_subparsers(title='Commands', dest='action', description='\n'.join(description))
172174
for domain, command_description in commands.items():
173175
list_parser = subparsers.add_parser('list_%ss' % domain)

0 commit comments

Comments
 (0)
0