mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-02-20 07:12:05 +00:00
initialized loaded_toml to None
This commit is contained in:
parent
30773933f2
commit
f64645cf69
7
twoot.py
7
twoot.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user