end18 / psutil

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

get_connections errors on OS X #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
======================================================================
ERROR: test_get_connections_all (__main__.LimitedUserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 480, in test_get_connections_all
    cons = p.get_connections()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/__init__.py", line 334, in get_connections
    return _platform_impl.get_connections(self.pid)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/_psosx.py", line 116, in get_connections
    return _psposix.LsofParser(pid).get_process_connections()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/_psposix.py", line 113, in get_process_connections
    local_addr = self._normaddress(peers, family)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/_psposix.py", line 191, in _normaddress
    return (ip, int(port))
ValueError: invalid literal for int() with base 10: '*'

======================================================================
ERROR: test_get_connections_all (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 480, in test_get_connections_all
    cons = p.get_connections()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/__init__.py", line 334, in get_connections
    return _platform_impl.get_connections(self.pid)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/_psosx.py", line 116, in get_connections
    return _psposix.LsofParser(pid).get_process_connections()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/_psposix.py", line 113, in get_process_connections
    local_addr = self._normaddress(peers, family)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/_psposix.py", line 191, in _normaddress
    return (ip, int(port))
ValueError: invalid literal for int() with base 10: '*'

Original issue reported on code.google.com by jlo...@gmail.com on 6 Aug 2010 at 12:14

GoogleCodeExporter commented 9 years ago
For now I've disabled these in the test suite in OS X until we have time to fix 
the parsing code.

Original comment by jlo...@gmail.com on 20 Sep 2010 at 11:12

GoogleCodeExporter commented 9 years ago

Original comment by jlo...@gmail.com on 20 Sep 2010 at 11:12

GoogleCodeExporter commented 9 years ago
I suspect port == "*" refers to a remote (non local) UDP endpoint in which case 
the address tuple should be manually set to ().

Original comment by g.rodola on 26 Oct 2010 at 1:43

GoogleCodeExporter commented 9 years ago
Fixed in r782, r783 and r784.

Original comment by g.rodola on 11 Nov 2010 at 10:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Updated csets after the SVN -> Mercurial migration:
r782 == revision 0128cc5e790b

Original comment by g.rodola on 2 Mar 2013 at 11:54