summaryrefslogtreecommitdiffstats
path: root/modules/process.py
diff options
context:
space:
mode:
authorRobin Norwood <rnorwood@redhat.com>2007-09-24 17:43:05 -0400
committerRobin Norwood <rnorwood@redhat.com>2007-09-24 17:43:05 -0400
commit3a78963db6e4747be51935bdd1928e220945b49b (patch)
tree72319cc571b8c783e836ef5b9aa7f852d858decc /modules/process.py
parentfbb252b32b8d966bde90aa8c6f9fb544b100149b (diff)
parent0067f7ff6189fdd46f49e45ed2099511eb4de004 (diff)
downloadfunc-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-xmodules/process.py10
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()