修复网络检查的程序异常
This commit is contained in:
parent
f74471bce7
commit
eb474b2a9f
|
@ -120,11 +120,11 @@ class UpdateManagerDbusController(dbus.service.Object):
|
||||||
obj = self.bus.get_object("org.freedesktop.NetworkManager","/org/freedesktop/NetworkManager")
|
obj = self.bus.get_object("org.freedesktop.NetworkManager","/org/freedesktop/NetworkManager")
|
||||||
interface = dbus.Interface(obj, "org.freedesktop.NetworkManager")
|
interface = dbus.Interface(obj, "org.freedesktop.NetworkManager")
|
||||||
retval = interface.CheckConnectivity(timeout=0.5)
|
retval = interface.CheckConnectivity(timeout=0.5)
|
||||||
#1 表示没有网卡可以使用
|
|
||||||
if retval == 1:
|
|
||||||
raise UpdateBaseError(enums.ERROR_NETWORK_FAILED)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
retval = 4
|
||||||
|
#1 表示没有网卡可以使用
|
||||||
|
if retval == 1:
|
||||||
|
raise UpdateBaseError(enums.ERROR_NETWORK_FAILED)
|
||||||
|
|
||||||
def _check_prohibit_user(self, sender_name):
|
def _check_prohibit_user(self, sender_name):
|
||||||
prohibit_list = ["dbus-send","gdbus"]
|
prohibit_list = ["dbus-send","gdbus"]
|
||||||
|
|
Loading…
Reference in New Issue