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): |