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

Unified Diff: third_party/psutil/psutil/_psosx.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/_psosx.py
diff --git a/third_party/psutil/psutil/_psosx.py b/third_party/psutil/psutil/_psosx.py
index 543124c077d3b3ba41de1b65fad12875c1be14d6..4112883131ee601b9c291dbf726d36e5d7d01073 100644
--- a/third_party/psutil/psutil/_psosx.py
+++ b/third_party/psutil/psutil/_psosx.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# $Id: _psosx.py 1142 2011-10-05 18:45:49Z g.rodola $
+# $Id: _psosx.py 1159 2011-10-14 18:42:54Z g.rodola@gmail.com $
#
# 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
@@ -194,11 +194,16 @@ class Process(object):
return files
@wrap_exceptions
- def get_connections(self):
+ def get_connections(self, kind='inet'):
"""Return etwork connections opened by a process as a list of
- namedtuples."""
- retlist = _psutil_osx.get_process_connections(self.pid)
- return [ntuple_connection(*conn) for conn in retlist]
+ namedtuples.
+ """
+ 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_osx.get_process_connections(self.pid, families, types)
+ return [ntuple_connection(*conn) for conn in ret]
@wrap_exceptions
def process_wait(self, timeout=None):

Powered by Google App Engine
This is Rietveld 408576698