martyr-deepin / deepin-utils

Basic utils for all project in Linux Deepin.
6 stars 5 forks source link

get network state by dbus failed, then try route #1

Closed itxx00 closed 10 years ago

itxx00 commented 10 years ago

Hello,

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/deepin_utils/net.py", line 47, in is_network_connected
    return is_network_connected_by_nm()
  File "/usr/lib64/python2.7/site-packages/deepin_utils/net.py", line 31, in is_network_connected_by_nm
    proxy = sys_bus.get_object("org.freedesktop.NetworkManager","/org/freedesktop/NetworkManager")
  File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
DBusException: org.freedesktop.systemd1.LoadFailed: Unit dbus-org.freedesktop.NetworkManager.service failed to load: No such file or directory.
INFO     Start quit...
manateelazycat commented 10 years ago

Hi, is_network_connected use network-manager get state, if failed it use command "route -nNvee" get connection state.

I think you not use network-manager in your system. Above log is debug information, please just ignore it. ;)

itxx00 commented 10 years ago

soga , thanks.