You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we've introduced Process.as_dict() method ( issue 278 ) a typical
usage one might face is to serialize the returned dict.
When that's done, process status gets automatically turned into a string due
to:
https://code.google.com/p/psutil/source/browse/tags/release-0.4.1/psutil/_common.py#27
That makes it impossible to compare the serialized status value (which is a
string) with the base STATUS_* constants (which are derived from int but
doesn't check for equality with the string).
Proposal
is to override constant.__eq__ method in order to use both int or str values
when comparing for equality.
From g.rodola on June 13, 2012 15:58:56
Original issue: http://code.google.com/p/psutil/issues/detail?id=282
The text was updated successfully, but these errors were encountered: