git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python3 - 2to3 + miscell obvious tweaks
[sfa.git]
/
sfa
/
planetlab
/
nodemanager.py
diff --git
a/sfa/planetlab/nodemanager.py
b/sfa/planetlab/nodemanager.py
index
db8bc0f
..
2e755d9
100644
(file)
--- a/
sfa/planetlab/nodemanager.py
+++ b/
sfa/planetlab/nodemanager.py
@@
-1,5
+1,5
@@
import tempfile
import tempfile
-import
command
s
+import
subproces
s
import os
import os
@@
-40,11
+40,11
@@
print s.%(method)s%(args)s""" % locals()
f.close()
# make the file executeable
chmod_cmd = "/bin/chmod 775 %(filename)s" % locals()
f.close()
# make the file executeable
chmod_cmd = "/bin/chmod 775 %(filename)s" % locals()
- (status, output) =
command
s.getstatusoutput(chmod_cmd)
+ (status, output) =
subproces
s.getstatusoutput(chmod_cmd)
# execute the commad as a slice with root NM privs
cmd = 'su - %(sfa_slice)s -c "%(python)s %(scriptname)s"' % locals()
# execute the commad as a slice with root NM privs
cmd = 'su - %(sfa_slice)s -c "%(python)s %(scriptname)s"' % locals()
- (status, output) =
command
s.getstatusoutput(cmd)
+ (status, output) =
subproces
s.getstatusoutput(cmd)
return (status, output)
finally:
os.unlink(filename)
return (status, output)
finally:
os.unlink(filename)