Browse Source

Document default values of runtime arguments

Argparse can output the default values of the runtime
arguments. Enable it so we have them documented.

Change-Id: I4fd7f21546615bd249485707521d8222fab10962
tags/3.5.0
Tobias Henkel 7 months ago
parent
commit
97060ea7ba
No account linked to committer's email address
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      nodepool/cmd/__init__.py

+ 3
- 1
nodepool/cmd/__init__.py View File

@@ -91,7 +91,9 @@ class NodepoolApp(object):
91 91
         return os.path.abspath(os.path.expanduser(path))
92 92
 
93 93
     def create_parser(self):
94
-        parser = argparse.ArgumentParser(description=self.app_description)
94
+        parser = argparse.ArgumentParser(
95
+            description=self.app_description,
96
+            formatter_class=argparse.ArgumentDefaultsHelpFormatter)
95 97
 
96 98
         parser.add_argument('-l',
97 99
                             dest='logconfig',

Loading…
Cancel
Save