]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Move monkey patching to __init__.py
authorZack Cerza <zack@cerza.org>
Fri, 11 Oct 2013 00:13:55 +0000 (19:13 -0500)
committerZack Cerza <zack@cerza.org>
Fri, 11 Oct 2013 00:15:01 +0000 (19:15 -0500)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/__init__.py
teuthology/nuke.py
teuthology/run.py

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f153cf9eeccf80f7bff37cc1ff55a89bffba0faa 100644 (file)
@@ -0,0 +1,4 @@
+from gevent import monkey
+monkey.patch_all(dns=False)
+from .orchestra import monkey
+monkey.patch_all()
index f67d49ec1896f4df6a9a0eb1036673fa24f1094c..60af998960233e56775eee882e997e14a2ac3dde 100644 (file)
@@ -265,10 +265,6 @@ def synch_clocks(remotes, log):
 
 
 def main(ctx):
-    import gevent.monkey
-    gevent.monkey.patch_all(dns=False)
-    from teuthology.orchestra import monkey
-    monkey.patch_all()
     from teuthology.run import config_file
     import os
 
index e1ebab568dc73b551b34ac36cb314f51fb243d23..04a72fee540496d0fea83de354c68817bee407b9 100644 (file)
@@ -91,19 +91,10 @@ def write_initial_metadata(ctx):
 
 
 def main(ctx):
-    from gevent import monkey
-    monkey.patch_all(dns=False)
-    from .orchestra import monkey
-    monkey.patch_all()
-
-    # WARNING: Do not import any modules that import logging before this next
-    # block. That would cause connections to hang because the monkey patching
-    # hadn't been done.
     import logging
     set_up_logging(ctx)
     log = logging.getLogger(__name__)
 
-    # Now it is safe to import other teuthology modules.
     from . import report
 
     if ctx.owner is None: