diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2016-02-04 06:57:29 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2016-02-04 06:57:29 +0100 |
commit | 576633249bbb2c79b7ea125019d311ce19440386 (patch) | |
tree | 8e9cc958f2a3d9da4f1e1b64baf0781eadd2f40c | |
parent | 88a1691f210394c0f5ab3ca950472b4d10ffce8f (diff) | |
download | psutil-576633249bbb2c79b7ea125019d311ce19440386.tar.gz |
remove @wrap_exceptions_w_zombie (it seems it's unnecessary)
-rw-r--r-- | psutil/_pslinux.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 0a5685dd..bda98539 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -829,20 +829,6 @@ def wrap_exceptions(fun): return wrapper -def wrap_exceptions_w_zombie(fun): - """Same as above but also handles zombies.""" - @functools.wraps(fun) - def wrapper(self, *args, **kwargs): - try: - return wrap_exceptions(fun)(self) - except NoSuchProcess: - if not pid_exists(self.pid): - raise - else: - raise ZombieProcess(self.pid, self._name, self._ppid) - return wrapper - - class Process(object): """Linux process implementation.""" @@ -1080,7 +1066,7 @@ class Process(object): % self.pid raise NotImplementedError(msg) - @wrap_exceptions_w_zombie + @wrap_exceptions def cwd(self): return readlink("%s/%s/cwd" % (self._procfs_path, self.pid)) |