FIX - Beim Einlesen der Blacklist-Nummern ist es nun egal, ob der String mit den Nummern in eine Liste geschrieben wird oder nicht. Wieso dies überhaupt passiert konnte nicht nachvollzogen werden

This commit is contained in:
2024-10-14 10:52:49 +02:00
parent 7492059744
commit dc8fb06110
+7 -3
View File
@@ -25,13 +25,17 @@ def get_blacklist(outdir):
config.read(blacklist_source_path)
except configparser.DuplicateOptionError:
pass
content = config.get('Settings','PartNumbersToDrop')
blacklist_str = content[0] # warum das als Liste erkannt wird wissen die Götter...
if len(blacklist_str) == 0 or len(content) == 0:
if type(content) == list:
content = content[0] # Wird benötigt, weil der String mit den Nummern aus der Blackliste manchmal in eine Liste gepackt wird, manchmal nicht - warum wissen die Götter...
if len(content) == 0 or len(content) == 0:
print(f"import of '{blacklist_ini_filename}' from '{blacklist_net_share}' failed")
exit
blacklist = blacklist_str.split(';')
blacklist = content.split(';')
print("writing txt-file of blacklist ids...")
outfile = os.path.join(outdir, 'blacklist.txt')