None Type Fix
* fix self.process None Type operation error
This commit is contained in:
parent
85ca549fab
commit
347d2f5d46
5
main.py
5
main.py
|
@ -70,11 +70,16 @@ class BlacklistImporter:
|
|||
def process(self):
|
||||
# init new YAML variable
|
||||
local_file = YAML(typ="safe")
|
||||
|
||||
# prevent None errors
|
||||
if self.outfile is not None:
|
||||
# catch FileNotFoundError on first run or file missing
|
||||
try:
|
||||
local_file = local_file.load(open(self.outfile, "r", encoding="utf-8"))
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
|
||||
remote_file = {
|
||||
"acl": {
|
||||
"spamblacklist": {
|
||||
|
|
Loading…
Reference in New Issue