Jahaja / psdash

A linux system information web dashboard using psutils and flask
Creative Commons Zero v1.0 Universal
2.42k stars 325 forks source link

Can't get network addresses #20

Closed chrisgilmerproj closed 10 years ago

chrisgilmerproj commented 10 years ago

On my mac this line net.py#L88 throws an error. I got around this by catching the exception and returning an empty list.

Traceback (most recent call last):
  File "/dash/env/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/dash/env/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/dash/env/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/dash/env/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/dash/env/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/dash/env/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/dash/env/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/dash/env/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/dash/env/lib/python2.7/site-packages/psdash/web.py", line 163, in index
    netifs = get_network_interfaces()
  File "/dash/env/lib/python2.7/site-packages/psdash/web.py", line 47, in get_network_interfaces
    addresses = get_interface_addresses()
  File "/dash/env/lib/python2.7/site-packages/psdash/net.py", line 86, in get_interface_addresses
    ifconf_res = fcntl.ioctl(sock.fileno(), SIOCGIFCONF, ifconf_val)
IOError: [Errno 102] Operation not supported on socket
Jahaja commented 10 years ago

Hi Chris, There's currently no support for OS X. More info on this in #5.