Add some useful features to our flags

* No longer dies if there are unknown flags.
* Allows you to declare that you will use a flag from another file
* Allows you to import new flags at runtime and reparses the original
  arguments to fill them once they are accessed.
This commit is contained in:
andy
2010-07-29 19:53:00 +02:00
parent 61e4b87185
commit e70e2a10cc
5 changed files with 232 additions and 6 deletions

View File

@@ -0,0 +1,5 @@
from nova import flags
FLAGS = flags.FLAGS
flags.DEFINE_integer('answer', 42, 'test flag')