diff options
| author | Ken Pepple <ken.pepple@gmail.com> | 2011-04-21 10:29:11 -0700 |
|---|---|---|
| committer | Ken Pepple <ken.pepple@gmail.com> | 2011-04-21 10:29:11 -0700 |
| commit | f205dcf659697adaae0d85a042ea2ea7ffe5c1c7 (patch) | |
| tree | b2da90f0cb240450bc30b9d6ebc3c703145b9bb6 /nova/flags.py | |
| parent | dfcdafde2dc202aa3325cd1cea8d809f56fdde57 (diff) | |
| parent | c796920198305e101c75bcbf4e027ba9e81975d7 (diff) | |
| download | nova-f205dcf659697adaae0d85a042ea2ea7ffe5c1c7.tar.gz nova-f205dcf659697adaae0d85a042ea2ea7ffe5c1c7.tar.xz nova-f205dcf659697adaae0d85a042ea2ea7ffe5c1c7.zip | |
rebase trunk
Diffstat (limited to 'nova/flags.py')
| -rw-r--r-- | nova/flags.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/nova/flags.py b/nova/flags.py index f011ab383..d1b93f0a8 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -16,9 +16,13 @@ # License for the specific language governing permissions and limitations # under the License. -""" +"""Command-line flag library. + +Wraps gflags. + Package-level global flags are defined here, the rest are defined where they're used. + """ import getopt @@ -145,10 +149,12 @@ class FlagValues(gflags.FlagValues): class StrWrapper(object): - """Wrapper around FlagValues objects + """Wrapper around FlagValues objects. Wraps FlagValues objects for string.Template so that we're - sure to return strings.""" + sure to return strings. + + """ def __init__(self, context_objs): self.context_objs = context_objs @@ -169,6 +175,7 @@ def _GetCallingModule(): We generally use this function to get the name of the module calling a DEFINE_foo... function. + """ # Walk down the stack to find the first globals dict that's not ours. for depth in range(1, sys.getrecursionlimit()): @@ -192,6 +199,7 @@ def __GetModuleName(globals_dict): Returns: A string (the name of the module) or None (if the module could not be identified. + """ for name, module in sys.modules.iteritems(): if getattr(module, '__dict__', None) is globals_dict: @@ -326,7 +334,7 @@ DEFINE_integer('auth_token_ttl', 3600, 'Seconds for auth tokens to linger') DEFINE_string('state_path', os.path.join(os.path.dirname(__file__), '../'), "Top-level directory for maintaining nova's state") DEFINE_string('lock_path', os.path.join(os.path.dirname(__file__), '../'), - "Directory for lock files") + 'Directory for lock files') DEFINE_string('logdir', None, 'output to a per-service log file in named ' 'directory') |
