diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-24 14:52:43 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-24 14:52:43 -0400 |
commit | 412671ee48804867fc6707fa12409ae9365f5ea3 (patch) | |
tree | 2a29b9acf28b8e372d54504dc7c7d6a9890f7ae9 /modules/process.py | |
parent | 731190a1b414e3d5b31e6de5c80772d6f532f658 (diff) | |
download | func-412671ee48804867fc6707fa12409ae9365f5ea3.tar.gz func-412671ee48804867fc6707fa12409ae9365f5ea3.tar.xz func-412671ee48804867fc6707fa12409ae9365f5ea3.zip |
Package the subprocess module so that we can use it on EL4.
Diffstat (limited to 'modules/process.py')
-rwxr-xr-x | modules/process.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/process.py b/modules/process.py index aa5e315..3e40fe1 100755 --- a/modules/process.py +++ b/modules/process.py @@ -15,7 +15,7 @@ ## # other modules -import subprocess +import sub_process # our modules from codes import * @@ -41,7 +41,7 @@ class ProcessModule(func_module.FuncModule): flags.replace(";","") # prevent stupidity - cmd = subprocess.Popen("ps %s" % flags,stdout=subprocess.PIPE,shell=True) + cmd = sub_process.Popen("ps %s" % flags,stdout=sub_process.PIPE,shell=True) data = cmd.communicate()[0] results = [] @@ -53,12 +53,12 @@ class ProcessModule(func_module.FuncModule): return results def kill(self,pid,level=""): - rc = subprocess.call("/bin/kill %s %s" % (pid, level), shell=True) + rc = sub_process.call("/bin/kill %s %s" % (pid, level), shell=True) return rc def pkill(self,name,level=""): # example killall("thunderbird","-9") - rc = subprocess.call("/usr/bin/pkill %s %s" % (name, level), shell=True) + rc = sub_process.call("/usr/bin/pkill %s %s" % (name, level), shell=True) return rc methods = ProcessModule() |