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

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

Issue 8159001: Update third_party/psutil and fix the licence issue with it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove the suppression and unnecessary files. Created 9 years, 2 months 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
« no previous file with comments | « third_party/psutil/psutil/compat.py ('k') | third_party/psutil/setup.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/psutil/psutil/error.py
diff --git a/third_party/psutil/psutil/error.py b/third_party/psutil/psutil/error.py
index 214a241b993af1ac39b32a8ef4e9c3a156eada8a..0298cb9475530c015408bef34818e2230fc4f8a6 100644
--- a/third_party/psutil/psutil/error.py
+++ b/third_party/psutil/psutil/error.py
@@ -1,9 +1,12 @@
#!/usr/bin/env python
#
-# $Id: error.py 744 2010-10-27 22:42:42Z jloden $
+# $Id: error.py 1142 2011-10-05 18:45:49Z 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
+# found in the LICENSE file.
-"""psutil exception classes"""
+"""psutil exception classes; do not import this directly"""
class Error(Exception):
@@ -49,3 +52,22 @@ class AccessDenied(Error):
def __str__(self):
return self.msg
+
+class TimeoutExpired(Error):
+ """Raised on Process.wait(timeout) if timeout expires and process
+ is still alive.
+ """
+
+ def __init__(self, pid=None, name=None):
+ self.pid = pid
+ self.name = name
+ if (pid is not None) and (name is not None):
+ self.msg = "(pid=%s, name=%s)" % (pid, repr(name))
+ elif (pid is not None):
+ self.msg = "(pid=%s)" % self.pid
+ else:
+ self.msg = ""
+
+ def __str__(self):
+ return self.msg
+
« no previous file with comments | « third_party/psutil/psutil/compat.py ('k') | third_party/psutil/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698