summaryrefslogtreecommitdiffstats
path: root/lava-slave
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2019-09-19 18:37:24 +0200
committerGitHub <noreply@github.com>2019-09-19 18:37:24 +0200
commitd25168d74c1d6860b4109e2b039e5d2033dc7235 (patch)
treee6f60dd5fc364c00d11e99ed6406c930d4229401 /lava-slave
parentb62cce369977403b2b2fa5e6d7c0af9d71058364 (diff)
parenta144f4de932d1d8925c3f76579ddd0f3979b9b3d (diff)
Merge pull request #102 from rosen-group/fix/lava_slave_python
Fix/lava slave python
Diffstat (limited to 'lava-slave')
-rw-r--r--lava-slave/scripts/setdispatcherip.py6
-rwxr-xr-xlava-slave/scripts/start.sh2
2 files changed, 4 insertions, 4 deletions
diff --git a/lava-slave/scripts/setdispatcherip.py b/lava-slave/scripts/setdispatcherip.py
index a058cba..20c2743 100644
--- a/lava-slave/scripts/setdispatcherip.py
+++ b/lava-slave/scripts/setdispatcherip.py
@@ -1,11 +1,11 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
-import xmlrpclib
+import xmlrpc.client
import sys
if len(sys.argv) < 4:
print("ERROR: Usage: %s URI workername dispatcherIP" % sys.argv[0])
sys.exit(1)
-server = xmlrpclib.ServerProxy("%s" % sys.argv[1])
+server = xmlrpc.client.ServerProxy("%s" % sys.argv[1])
server.scheduler.workers.set_config("%s" % sys.argv[2], "dispatcher_ip: %s" % sys.argv[3])
diff --git a/lava-slave/scripts/start.sh b/lava-slave/scripts/start.sh
index f88b816..334f52e 100755
--- a/lava-slave/scripts/start.sh
+++ b/lava-slave/scripts/start.sh
@@ -39,7 +39,7 @@ fi
# start an http file server for boot/transfer_overlay support
-(cd /var/lib/lava/dispatcher; python -m SimpleHTTPServer 80) &
+(cd /var/lib/lava/dispatcher; python3 -m http.server 80) &
# FIXME lava-slave does not run if old pid is present
rm -f /var/run/lava-slave.pid