for c in cmd:
print("Will run: %s"%(c,))
-p = subprocess.Popen(['bconsole'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+p = subprocess.Popen(['/usr/sbin/bconsole'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(out, err) = p.communicate("\n".join(cmd).encode())
if p.returncode != 0:
raise Exception("bconsole failed. stdout:\n%s\nstderr:%s\n"%(out, err))