Explorar el Código

Move http_client import to the top of the file

Mike Naberezny hace 10 años
padre
commit
8e2da4e24c
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      supervisor/supervisorctl.py

+ 1 - 2
supervisor/supervisorctl.py

@@ -42,6 +42,7 @@ from supervisor.options import make_namespec
 from supervisor.options import split_namespec
 from supervisor import xmlrpc
 from supervisor import states
+from supervisor import http_client
 
 class fgthread(threading.Thread):
     """ A subclass of threading.Thread, with a kill() method.
@@ -51,7 +52,6 @@ class fgthread(threading.Thread):
 
     def __init__(self, program, ctl):
         threading.Thread.__init__(self)
-        import supervisor.http_client as http_client
         self.killed = False
         self.program = program
         self.ctl = ctl
@@ -427,7 +427,6 @@ class DefaultControllerPlugin(ControllerPluginBase):
             # always sends a Connection: close header).  We use a
             # homegrown client based on asyncore instead.  This makes
             # me sad.
-            import supervisor.http_client as http_client
             if self.listener is None:
                 listener = http_client.Listener()
             else: