This commit is contained in:
James
2022-02-03 18:29:08 +00:00
parent cbb9f82c26
commit 35b542cc7f

View File

@@ -130,17 +130,18 @@ def read_workshop(content_file: str) -> tuple:
with open(content_file, "rt") as content:
content_ids = content.readlines()
for content_id in content_ids:
if content_id.strip() == "":
stripped_id = content_id.strip()
if stripped_id == "":
break
if not content_id.isnumeric():
print(f"Error: Invalid content ID '{content_id}', all IDs should be numeric!")
if not stripped_id.isnumeric():
print(f"Error: Invalid content ID '{stripped_id}', all IDs should be numeric!")
return (False, [])
if content_id in SERVER_SETUP_CONTENT:
if stripped_id in SERVER_SETUP_CONTENT:
continue
out_content.append(content_id)
out_content.append(stripped_id)
print(f"Found {len(out_content)} content IDs")