mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
Handle python-dbus not installed
old-commit-hash: 25054cdc0538a0324b7f7c1bcc9d6166291b4e10
This commit is contained in:
@@ -25,7 +25,11 @@ MM_MODEM_ACCESS_TECHNOLOGY_LTE = 1 << 14
|
||||
|
||||
class Tici(HardwareBase):
|
||||
def __init__(self):
|
||||
import dbus # pylint: disable=import-error
|
||||
# TODO: remove when dbus is installed everywhere
|
||||
try:
|
||||
import dbus # pylint: disable=import-error
|
||||
except ImportError:
|
||||
return
|
||||
|
||||
self.bus = dbus.SystemBus()
|
||||
self.nm = self.bus.get_object(NM, '/org/freedesktop/NetworkManager')
|
||||
|
||||
Reference in New Issue
Block a user