initialized loaded_toml to None

This commit is contained in:
jeancf 2022-11-29 11:26:29 +01:00
parent 30773933f2
commit f64645cf69

View File

@ -50,7 +50,7 @@ NITTER_URLS = [
'https://nitter.pussthecat.org',
'https://nitter.fdn.fr',
'https://nitter.eu',
'https://twitter.beparanoid.de/',
'https://twitter.beparanoid.de',
'https://n.l5.ca',
'https://nitter.bus-hit.me',
]
@ -105,8 +105,8 @@ def build_config(args):
except ModuleNotFoundError:
# for python < 3.11, tomli module must be installed
import tomli as tomllib
loaded_toml
loaded_toml = None
# Load toml file
try:
with open(toml_file, 'rb') as config_file:
@ -118,7 +118,6 @@ def build_config(args):
print('Malformed config file')
exit(-1)
# Override config parameters with values fount in the file
TOML['config'] = loaded_toml['config']
for k in TOML['options'].keys():
try: # Go through all valid keys