Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
Uh! Interesting.
Why do you consider this to be a bug with psutil though?
The only debatable argument is whether to turn that into an AccessDenied
exception in order to be consistent with psutil.Process class, but other than
that psutil can't and shouldn't do anything about it.
Original comment by g.rodola
on 28 Dec 2012 at 3:42
Agree with you. PsUtil should generate an error but an internal error like
psutil.AccessDenied will be better.
Regards
Original comment by nicolash...@gmail.com
on 18 Jan 2013 at 4:26
I'm -1 about wrapping all non-process related functions in order to generate
AccessDenied exceptions though.
The chances we get EPERM are very rare, the original OSError exception is
clearer and AccessDenied class is incompatible as it expects a pid and a name
argument [1], both of which refer to a process.
[1] http://code.google.com/p/psutil/source/browse/trunk/psutil/error.py#37
Original comment by g.rodola
on 20 Jan 2013 at 6:58
Original issue reported on code.google.com by
nicolash...@gmail.com
on 26 Dec 2012 at 9:12