Skip to content
Snippets Groups Projects
Commit 58bb1c9e authored by KERDREUX Jerome's avatar KERDREUX Jerome
Browse files

Fix black ' ' => " "

Grr
parent 08fe8253
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ class Config:
self.log_level = DEF_LOG_LEVEL
self.log_path = DEF_LOG_PATH
self.remote_console = DEF_REMOTE_CONSOLE
self.key = b""
self.key = b''
self.STACK_VERSION = STACK_VERSION
def load(self, name="xaal.ini"):
......@@ -41,19 +41,19 @@ class Config:
raise FileNotFoundError(f"Unable to load xAAL config file [{filename}]")
cfg = ConfigObj(filename)
self.address = self.safe_string(cfg.get("address"), DEF_ADDR)
self.port = self.safe_int(cfg.get("port"), DEF_PORT)
self.hops = self.safe_int(cfg.get("hops"), DEF_HOPS)
self.alive_timer = self.safe_int(cfg.get("alive_timer"), DEF_ALIVE_TIMER)
self.cipher_window = self.safe_int(cfg.get("cipher_window"), DEF_CIPHER_WINDOW)
self.queue_size = self.safe_int(cfg.get("queue_size"), DEF_QUEUE_SIZE)
self.log_level = self.safe_string(cfg.get("log_level"), DEF_LOG_LEVEL)
self.log_path = self.safe_string(cfg.get("log_path"), DEF_LOG_PATH)
self.remote_console = self.safe_bool(cfg.get("remote_console"), DEF_REMOTE_CONSOLE)
self.address = self.safe_string(cfg.get('address'), DEF_ADDR)
self.port = self.safe_int(cfg.get('port'), DEF_PORT)
self.hops = self.safe_int(cfg.get('hops'), DEF_HOPS)
self.alive_timer = self.safe_int(cfg.get('alive_timer'), DEF_ALIVE_TIMER)
self.cipher_window = self.safe_int(cfg.get('cipher_window'), DEF_CIPHER_WINDOW)
self.queue_size = self.safe_int(cfg.get('queue_size'), DEF_QUEUE_SIZE)
self.log_level = self.safe_string(cfg.get('log_level'), DEF_LOG_LEVEL)
self.log_path = self.safe_string(cfg.get('log_path'), DEF_LOG_PATH)
self.remote_console = self.safe_bool(cfg.get('remote_console'), DEF_REMOTE_CONSOLE)
key = cfg.get("key", None)
key = cfg.get('key', None)
if key and type(key) is str:
self.key = binascii.unhexlify(key.encode("utf-8"))
self.key = binascii.unhexlify(key.encode('utf-8'))
else:
raise ValueError(f"Key not set in config file [{filename}]")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment