diff options
| author | Jay Loden <jloden@gmail.com> | 2009-03-13 03:22:55 +0000 |
|---|---|---|
| committer | Jay Loden <jloden@gmail.com> | 2009-03-13 03:22:55 +0000 |
| commit | bdfd71e2fdd4c52be99835909755cc4c8f2bfcd5 (patch) | |
| tree | 1b369721dc1f5a18acf86a0bcdc701cfb137576a /psutil/error.py | |
| parent | 956b0afbecfccad2fc1152ea095c8a74934e4d0d (diff) | |
| download | psutil-bdfd71e2fdd4c52be99835909755cc4c8f2bfcd5.tar.gz | |
Removed need for import of psutil module in platform specific modules by:
1) split exceptions out into error.py so they can be imported by multiple modules
within the package and overriden in the global psutil namespace by
platform-specific C module versions as needed.
2) Impl.get_process_info() now returns just the tuple, and deproxy() handles
passing it to the constructor of a ProcessInfo() object and creating the
instance for Process._procinfo
I've updated all the files for all platforms but only tested on OS X, will
verify nothing broke on Linux, BSD, and Windows and commit any necessary
changes in the next revision(s).
Diffstat (limited to 'psutil/error.py')
| -rw-r--r-- | psutil/error.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/psutil/error.py b/psutil/error.py new file mode 100644 index 00000000..d52362e1 --- /dev/null +++ b/psutil/error.py @@ -0,0 +1,9 @@ +import sys + +# this exception get overriden by the platform specific modules if necessary +class NoSuchProcess(Exception): + """No process was found for the given parameters.""" + +class AccessDenied(Exception): + """Exception raised when permission to perform an action is denied.""" + |
