mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Update dependency list and pep8 fixes.
This commit is contained in:
1 parent
40bbad4484
commit
ed4e6eddc1
4 files changed
+19
-12
No files matched your search
+4
-2
@@ -35,6 +35,7 @@ CONNECTION_TYPE_NAMES = {
|
||||
class ConnectionNotFound(Exception):
|
||||
def __init__(self, msg):
|
||||
self.msg = msg
|
||||
|
||||
def __str__(self):
|
||||
return self.msg
|
||||
|
||||
@@ -42,6 +43,7 @@ class ConnectionNotFound(Exception):
|
||||
class DeviceNotFound(Exception):
|
||||
def __init__(self, msg):
|
||||
self.msg = msg
|
||||
|
||||
def __str__(self):
|
||||
return self.msg
|
||||
|
||||
@@ -179,8 +181,8 @@ def activate_connection(name):
|
||||
}.get(ctype, ctype)
|
||||
|
||||
for dev in NetworkManager.NetworkManager.GetDevices():
|
||||
if (dev.DeviceType == dtype
|
||||
and dev.State == NetworkManager.NM_DEVICE_STATE_DISCONNECTED):
|
||||
if (dev.DeviceType == dtype and
|
||||
dev.State == NetworkManager.NM_DEVICE_STATE_DISCONNECTED):
|
||||
break
|
||||
else:
|
||||
raise DeviceNotFound(
|
||||
|
||||
Reference in new issue
Block a user