diff --git a/MultiServer.py b/MultiServer.py index 5e370d1717..d58b466396 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -69,6 +69,12 @@ def remove_from_list(container, value): def pop_from_container(container, value): + if isinstance(container, list) and isinstance(value, int) and len(container) <= value: + return container + + if isinstance(container, dict) and value not in container: + return container + try: container.pop(value) except ValueError: