REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.94 KB
Close
//lib64/python3.6/site-packages/psutil/_exceptions.py
Text
Base64
# Copyright (c) 2009, 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. class Error(Exception): """Base exception class. All other psutil exceptions inherit from this one. """ def __init__(self, msg=""): Exception.__init__(self, msg) self.msg = msg def __repr__(self): ret = "psutil.%s %s" % (self.__class__.__name__, self.msg) return ret.strip() __str__ = __repr__ class NoSuchProcess(Error): """Exception raised when a process with a certain PID doesn't or no longer exists. """ def __init__(self, pid, name=None, msg=None): Error.__init__(self, msg) self.pid = pid self.name = name self.msg = msg if msg is None: if name: details = "(pid=%s, name=%s)" % (self.pid, repr(self.name)) else: details = "(pid=%s)" % self.pid self.msg = "process no longer exists " + details class ZombieProcess(NoSuchProcess): """Exception raised when querying a zombie process. This is raised on OSX, BSD and Solaris only, and not always: depending on the query the OS may be able to succeed anyway. On Linux all zombie processes are querable (hence this is never raised). Windows doesn't have zombie processes. """ def __init__(self, pid, name=None, ppid=None, msg=None): NoSuchProcess.__init__(self, msg) self.pid = pid self.ppid = ppid self.name = name self.msg = msg if msg is None: args = ["pid=%s" % pid] if name: args.append("name=%s" % repr(self.name)) if ppid: args.append("ppid=%s" % self.ppid) details = "(%s)" % ", ".join(args) self.msg = "process still exists but it's a zombie " + details class AccessDenied(Error): """Exception raised when permission to perform an action is denied.""" def __init__(self, pid=None, name=None, msg=None): Error.__init__(self, msg) self.pid = pid self.name = name self.msg = msg if msg is None: 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 = "" class TimeoutExpired(Error): """Raised on Process.wait(timeout) if timeout expires and process is still alive. """ def __init__(self, seconds, pid=None, name=None): Error.__init__(self, "timeout after %s seconds" % seconds) self.seconds = seconds 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
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 13
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
tests
DIR
-
drwxr-xr-x
2024-08-02 15:10:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2024-08-02 15:10:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_common.py
17.43 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_compat.py
7.98 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_exceptions.py
2.94 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_psaix.py
18.92 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_psbsd.py
29.54 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_pslinux.py
73.10 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_psosx.py
16.81 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_psposix.py
6.20 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_pssunos.py
25.05 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_psutil_linux.cpython-36m-x86_64-linux-gnu.so
29.09 KB
lrwxr-xr-x
2021-10-11 12:11:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_psutil_posix.cpython-36m-x86_64-linux-gnu.so
16.48 KB
lrwxr-xr-x
2021-10-11 12:11:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_pswindows.py
32.34 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
83.00 KB
lrw-r--r--
2018-01-01 20:32:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).