baweaver / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

Patch for /trunk/psutil/_psposix.py #352

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
don't blow up if pid_exists is passed a long for a pid

Original issue reported on code.google.com by dbon...@gmail.com on 21 Feb 2013 at 9:43

Attachments:

GoogleCodeExporter commented 8 years ago
That check is actually unnecessary because of what comes next:
http://code.google.com/p/psutil/source/browse/trunk/psutil/_psposix.py?spec=svn1
562&r=1551#22
If something different than a number is passed "if pid < 0:" will automatically 
raise TypeError on python 3 and os.kill() will do the same on both python 2 and 
3:

>>> os.kill('x', 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: an integer is required
>>> 

Thanks anyway.

Original comment by g.rodola on 22 Feb 2013 at 4:39

GoogleCodeExporter commented 8 years ago
See r1563.

Original comment by g.rodola on 22 Feb 2013 at 5:02

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Updated csets after the SVN -> Mercurial migration:
r1563 == revision 70d73524a81b

Original comment by g.rodola on 2 Mar 2013 at 12:14