diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-04-11 11:53:37 +0200 |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-04-11 11:53:37 +0200 |
commit | 0b3ba2cffac612225850a3b740f3ca597c1d3200 (patch) | |
tree | af1724616756405fa26f144cfb516c2f2ebd56cb | |
parent | ab944537085b96dfc80f3b7d1d69c20876d3d9df (diff) | |
download | psutil-0b3ba2cffac612225850a3b740f3ca597c1d3200.tar.gz |
use @_assert_is_running() also for set_nice()
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | psutil/__init__.py | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -42,7 +42,8 @@ BUG FIXES kvm_open(3) not being called. (patch by Jean Sebastien) * #338: [Linux] disk_io_counters() fails to find some disks. * #353: [OSX] get_users() returns an empty list on OSX 10.8. - * #365: Process.wait() should check PID has not been reused by another process. + * #365: Process wait() and set_nice() methods should check PID has not been + reused by another process. API CHANGES diff --git a/psutil/__init__.py b/psutil/__init__.py index 70942351..f485dcf6 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -126,6 +126,7 @@ class Process(object): The only exceptions for which process identity is pre-emptively checked are: - get_children() + - set_nice() - suspend() - resume() - send_signal() @@ -388,6 +389,7 @@ class Process(object): """Get process niceness (priority).""" return self._platform_impl.get_process_nice() + @_assert_is_running def set_nice(self, value): """Set process niceness (priority).""" return self._platform_impl.set_process_nice(value) |