import tempfile
-import commands
+import subprocess
import os
f.close()
# make the file executeable
chmod_cmd = "/bin/chmod 775 %(filename)s" % locals()
- (status, output) = commands.getstatusoutput(chmod_cmd)
+ (status, output) = subprocess.getstatusoutput(chmod_cmd)
# execute the commad as a slice with root NM privs
cmd = 'su - %(sfa_slice)s -c "%(python)s %(scriptname)s"' % locals()
- (status, output) = commands.getstatusoutput(cmd)
+ (status, output) = subprocess.getstatusoutput(cmd)
return (status, output)
finally:
os.unlink(filename)