diff options
author | Robin Norwood <rnorwood@redhat.com> | 2007-09-24 17:43:05 -0400 |
---|---|---|
committer | Robin Norwood <rnorwood@redhat.com> | 2007-09-24 17:43:05 -0400 |
commit | 3a78963db6e4747be51935bdd1928e220945b49b (patch) | |
tree | 72319cc571b8c783e836ef5b9aa7f852d858decc /modules/process.py | |
parent | fbb252b32b8d966bde90aa8c6f9fb544b100149b (diff) | |
parent | 0067f7ff6189fdd46f49e45ed2099511eb4de004 (diff) | |
download | func-3a78963db6e4747be51935bdd1928e220945b49b.tar.gz func-3a78963db6e4747be51935bdd1928e220945b49b.tar.xz func-3a78963db6e4747be51935bdd1928e220945b49b.zip |
Merge branch 'master' of git://git.fedoraproject.org/git/hosted/func
Diffstat (limited to 'modules/process.py')
-rwxr-xr-x | modules/process.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/process.py b/modules/process.py index 064b1b3..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 * @@ -32,7 +32,7 @@ class ProcessModule(func_module.FuncModule): } func_module.FuncModule.__init__(self) - def info(self,flags="-aux"): + def info(self,flags="-auxh"): """ Returns a struct of hardware information. By default, this pulls down all of the devices. If you don't care about them, set with_devices to @@ -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() |