Bug 930808 - Upgrade to psutil 2.1.3; r=glandium
psutil 2.1.3 is replacing psutil 1.0.1. There are numerous bug fixes and feature enhancements in psutil worth obtaining. Source code was obtained from https://pypi.python.org/packages/source/p/psutil/psutil-2.1.3.tar.gz and uncompressed into python/psutil without modification except for the removal of the egg-info directory and the .travis.yml file.
This commit is contained in:
@@ -12,6 +12,7 @@ import os
|
||||
import sys
|
||||
import psutil
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 2:
|
||||
sys.exit('usage: %s name' % __file__)
|
||||
@@ -20,7 +21,7 @@ def main():
|
||||
|
||||
killed = []
|
||||
for proc in psutil.process_iter():
|
||||
if proc.name == NAME and proc.pid != os.getpid():
|
||||
if proc.name() == NAME and proc.pid != os.getpid():
|
||||
proc.kill()
|
||||
killed.append(proc.pid)
|
||||
if not killed:
|
||||
|
||||
Reference in New Issue
Block a user