summaryrefslogtreecommitdiff
path: root/taskflow/examples
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-07-11 01:06:18 +0000
committerGerrit Code Review <review@openstack.org>2015-07-11 01:06:18 +0000
commitb76b6ed533e124eb98aa0c5219d8bf2774705074 (patch)
tree0a23bdfa04f96605d72fc40f087fd364fc73efb3 /taskflow/examples
parent6f27d6c0bdba686acbfe8c1898329169262a85c5 (diff)
parent2eb1af31e5a82bfe2dc7bffe3a5a1345f9c438ac (diff)
downloadtaskflow-b76b6ed533e124eb98aa0c5219d8bf2774705074.tar.gz
Merge "Allow the 99_bottles.py demo to run in BLATHER mode"
Diffstat (limited to 'taskflow/examples')
-rw-r--r--taskflow/examples/99_bottles.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/taskflow/examples/99_bottles.py b/taskflow/examples/99_bottles.py
index e134b30..0211df5 100644
--- a/taskflow/examples/99_bottles.py
+++ b/taskflow/examples/99_bottles.py
@@ -20,8 +20,6 @@ import os
import sys
import time
-logging.basicConfig(level=logging.ERROR)
-
top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__),
os.pardir,
os.pardir))
@@ -189,12 +187,17 @@ def run_poster():
def main():
if len(sys.argv) == 1:
sys.stderr.write("%s p|c\n" % os.path.basename(sys.argv[0]))
- elif sys.argv[1] == 'p':
- run_poster()
- elif sys.argv[1] == 'c':
- run_conductor()
+ elif sys.argv[1] in ('p', 'c'):
+ if sys.argv[-1] == "v":
+ logging.basicConfig(level=5)
+ else:
+ logging.basicConfig(level=logging.ERROR)
+ if sys.argv[1] == 'p':
+ run_poster()
+ else:
+ run_conductor()
else:
- sys.stderr.write("%s p|c\n" % os.path.basename(sys.argv[0]))
+ sys.stderr.write("%s p|c (v?)\n" % os.path.basename(sys.argv[0]))
if __name__ == '__main__':