a few more shebangs or calls to python
[nodemanager.git] / plugins / privatebridge.py
index 5ec15b9..748d392 100644 (file)
@@ -1,8 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 """ Private Bridge configurator.  """
 
-import httplib
+import http.client
 import os
 import select
 import shutil
@@ -66,13 +66,13 @@ def log_call_read(command, timeout=logger.default_timeout_minutes*60, poll=1):
     return (-1, None)
 
 ### Thierry - 23 Sept 2014
-# regardless of this being shipped on lxc-only or on all nodes, 
-# it is safer to check for the availability of the ovs-vsctl command and just print 
+# regardless of this being shipped on lxc-only or on all nodes,
+# it is safer to check for the availability of the ovs-vsctl command and just print
 # out a warning when it's not there, instead of a nasty traceback
 def ovs_available ():
     "return True if ovs-vsctl can be run"
     try:
-        child = subprocess.Popen (['ovs-ovsctl', '--help'])
+        child = subprocess.Popen (['ovs-vsctl', '--help'])
         child.communicate()
         return True
     except:
@@ -202,6 +202,3 @@ def GetSlivers(data, conf = None, plc = None):
         logger.log("privatebridge: deleting unused bridge %s" % bridge_name)
 
         ovs_delbridge(bridge_name)
-
-
-