chiark
/
gitweb
/
~mdw
/
chopwood
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service.py: Yet more unqualified names needing qualification.
[chopwood]
/
service.py
diff --git
a/service.py
b/service.py
index 515353905ac493a76b5fff4c1b4782a55c4be27f..0944e2c167dc16d0712f49b2821941c5f988a951 100644
(file)
--- a/
service.py
+++ b/
service.py
@@
-31,6
+31,7
@@
import subprocess as SUB
from auto import HOME
import backend as B
from auto import HOME
import backend as B
+import cgi as CGI
import config as CONF; CFG = CONF.CFG
import hash as H
import util as U
import config as CONF; CFG = CONF.CFG
import hash as H
import util as U
@@
-204,7
+205,7
@@
class BasicRemoteService (BasicService):
"""
## Run the command and collect its output and status.
"""
## Run the command and collect its output and status.
- with timeout(30, "waiting for remote service %s" % me._describe()):
+ with
U.
timeout(30, "waiting for remote service %s" % me._describe()):
proc = SUB.Popen(me._mkcmd(cmd),
stdin = input is not None and SUB.PIPE or None,
stdout = SUB.PIPE, stderr = SUB.PIPE)
proc = SUB.Popen(me._mkcmd(cmd),
stdin = input is not None and SUB.PIPE or None,
stdout = SUB.PIPE, stderr = SUB.PIPE)
@@
-289,7
+290,7
@@
class SSHRemoteService (BasicRemoteService):
def _mkcmd(me, cmd):
"""Format a command for SSH. Mainly escaping arguments."""
def _mkcmd(me, cmd):
"""Format a command for SSH. Mainly escaping arguments."""
- return ['ssh', me._remote, ' '.join(map(urlencode, cmd))]
+ return ['ssh', me._remote, ' '.join(map(
CGI.
urlencode, cmd))]
def setpasswd(me, user, passwd):
"""Service protocol: set the USER's password to PASSWD."""
def setpasswd(me, user, passwd):
"""Service protocol: set the USER's password to PASSWD."""