diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/ifconfig/wwan.py | 4 | ||||
| -rw-r--r-- | python/vyos/utils/network.py | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/wwan.py b/python/vyos/ifconfig/wwan.py index 2b5714b85..ffd3d0a67 100644 --- a/python/vyos/ifconfig/wwan.py +++ b/python/vyos/ifconfig/wwan.py @@ -26,6 +26,10 @@ class WWANIf(Interface): }, } + def _create(self): + # we can not create this interface as it is managed by the Kernel + pass + def remove(self): """ Remove interface from config. Removing the interface deconfigures all diff --git a/python/vyos/utils/network.py b/python/vyos/utils/network.py index f20450a5f..8985224f3 100644 --- a/python/vyos/utils/network.py +++ b/python/vyos/utils/network.py @@ -238,7 +238,11 @@ def is_wwan_connected(interface): modem = interface.lstrip('wwan') - tmp = cmd(f'mmcli --modem {modem} --output-json') + try: + tmp = cmd(f'mmcli --modem {modem} --output-json') + except OSError: + return False + tmp = loads(tmp) # return True/False if interface is in connected state |
