GithubHelp home page GithubHelp logo

Comments (9)

giampaolo avatar giampaolo commented on September 22, 2024

From [email protected] on February 23, 2009 09:54:35

You can wrap the call to get_process_info() in deproxy() and just raise the 
from there. That would be easier than having to write the exception into the C 
for every platform like we had to do for NoSuchProcess exceptions.

Status: Accepted
Owner: billiejoex

from psutil.

giampaolo avatar giampaolo commented on September 22, 2024

From [email protected] on February 24, 2009 05:00:53

Committed as r154 which adds an InsufficientPermission error class in psutil.py 
"wrap_privileges" decorator around get_process_info() and kill() methods, which
translates system-dependent exceptions signaling insufficient permissions into
InsufficientPermission's psutil exception.


Open issues:

- Do we want an alternative name for InsufficientPermission (e.g.
InsufficientPermissionError, NoSuchPermission/Error, AccessDenied/Error)?

- More test cases would be needed. I've only added a test case for posix 
based on os.getuid() > 0 to make sure that InsufficientPermission is raised 
limited user attempts to kill PID 1 (init), but there are currently no test 
Windows.

from psutil.

giampaolo avatar giampaolo commented on September 22, 2024

From [email protected] on February 24, 2009 09:25:29

Status: Started

from psutil.

giampaolo avatar giampaolo commented on September 22, 2024

From [email protected] on February 24, 2009 14:14:06

Per conversation with Jay renamed InsufficientPermission in AccessDenied.

from psutil.

giampaolo avatar giampaolo commented on September 22, 2024

From [email protected] on February 24, 2009 14:16:36

Labels: Milestone-0.1.1

from psutil.

giampaolo avatar giampaolo commented on September 22, 2024

From [email protected] on February 25, 2009 06:56:44

Is this one done now? I think we can close this out since it's implemented on 
platforms?

from psutil.

giampaolo avatar giampaolo commented on September 22, 2024

From [email protected] on February 25, 2009 07:34:41

Yes, I can't think of any way to test this on Windows so we can just close this 

from psutil.

giampaolo avatar giampaolo commented on September 22, 2024

From [email protected] on March 17, 2009 08:31:20

Status: Fixed

from psutil.

giampaolo avatar giampaolo commented on September 22, 2024

From g.rodola on March 02, 2013 03:44:09

Updated csets after the SVN -> Mercurial migration: r154 == revision 

from psutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.