Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: third_party/psutil/psutil/_psmswindows.py

Issue 8774018: Add psutil build step to fix pyauto media issues. Upgrade psutil to 0.4.0. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Disable Mac builds. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/psutil/psutil/_psmswindows.py
diff --git a/third_party/psutil/psutil/_psmswindows.py b/third_party/psutil/psutil/_psmswindows.py
index 81ffad7b37e5cb9e3cc3eeded72912ede9aec788..9f0be6541ea75f447614ed1661e2ff11abc11396 100644
--- a/third_party/psutil/psutil/_psmswindows.py
+++ b/third_party/psutil/psutil/_psmswindows.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# $Id: _psmswindows.py 1142 2011-10-05 18:45:49Z g.rodola $
+# $Id: _psmswindows.py 1157 2011-10-14 18:36:03Z g.rodola $
#
# Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -115,6 +115,8 @@ def get_system_per_cpu_times():
get_pid_list = _psutil_mswindows.get_pid_list
pid_exists = _psutil_mswindows.pid_exists
+network_io_counters = _psutil_mswindows.get_network_io_counters
+disk_io_counters = _psutil_mswindows.get_disk_io_counters
# --- decorator
@@ -267,9 +269,13 @@ class Process(object):
return retlist
@wrap_exceptions
- def get_connections(self):
- retlist = _psutil_mswindows.get_process_connections(self.pid)
- return [ntuple_connection(*conn) for conn in retlist]
+ def get_connections(self, kind='inet'):
+ if kind not in conn_tmap:
+ raise ValueError("invalid %r kind argument; choose between %s"
+ % (kind, ', '.join([repr(x) for x in conn_tmap])))
+ families, types = conn_tmap[kind]
+ ret = _psutil_mswindows.get_process_connections(self.pid, families, types)
+ return [ntuple_connection(*conn) for conn in ret]
@wrap_exceptions
def get_process_nice(self):

Powered by Google App Engine
This is Rietveld 408576698