mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-06-08 06:52:41 -04:00
Prepare interface modularity
This commit is contained in:
parent
760ab981d0
commit
a762af035a
14 changed files with 43 additions and 31 deletions
|
@ -24,6 +24,7 @@ import RNS
|
|||
import time
|
||||
import threading
|
||||
from collections import deque
|
||||
from RNS.vendor.configobj import ConfigObj
|
||||
|
||||
class Interface:
|
||||
IN = False
|
||||
|
@ -238,4 +239,15 @@ class Interface:
|
|||
RNS.log("The announce queue for this interface has been cleared.", RNS.LOG_ERROR)
|
||||
|
||||
def detach(self):
|
||||
pass
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def get_config_obj(config_in):
|
||||
if type(config_in) == ConfigObj:
|
||||
return config_in
|
||||
else:
|
||||
try:
|
||||
return ConfigObj(config_in)
|
||||
except Exception as e:
|
||||
RNS.log(f"Could not parse supplied configuration data. The contained exception was: {e}", RNS.LOG_ERROR)
|
||||
raise SystemError("Invalid configuration data supplied")
|
Loading…
Add table
Add a link
Reference in a new issue