-#!/usr/bin/env python
+#!/usr/bin/env python3
""" Private Bridge configurator. """
-import httplib
+import http.client
import os
import select
import shutil
logger.verbose("log_call: poll=%r s" % poll)
trigger=time.time()+timeout
try:
- child = subprocess.Popen(command, bufsize=1,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
+ child = subprocess.Popen(
+ command, bufsize=1,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+ close_fds=True,
+ universal_newlines=True)
stdout = ""
while True:
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"
logger.log("privatebridge: deleting unused bridge %s" % bridge_name)
ovs_delbridge(bridge_name)
-
-
-