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:
@@ -25,13 +25,17 @@ def get_blacklist(outdir):
|
|||||||
config.read(blacklist_source_path)
|
config.read(blacklist_source_path)
|
||||||
except configparser.DuplicateOptionError:
|
except configparser.DuplicateOptionError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
content = config.get('Settings','PartNumbersToDrop')
|
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")
|
print(f"import of '{blacklist_ini_filename}' from '{blacklist_net_share}' failed")
|
||||||
exit
|
exit
|
||||||
|
|
||||||
blacklist = blacklist_str.split(';')
|
blacklist = content.split(';')
|
||||||
|
|
||||||
print("writing txt-file of blacklist ids...")
|
print("writing txt-file of blacklist ids...")
|
||||||
outfile = os.path.join(outdir, 'blacklist.txt')
|
outfile = os.path.join(outdir, 'blacklist.txt')
|
||||||
|
|||||||
Reference in New Issue
Block a user