diff --git a/src/debug/decorators.py b/src/debug/decorators.py index d40d7be6..e58ed7cd 100644 --- a/src/debug/decorators.py +++ b/src/debug/decorators.py @@ -135,7 +135,7 @@ def __exit__(self, exc_type: Optional[type], exc_value: Optional[BaseException], # sanitize paths in tb: convert backslash to forward slash and remove prefixes from src and library paths variables[1] = variables[1].replace("\\", "/") - variables[1] = re.sub(r'File "[^"]*/(src|gamemodes|oyoyo|roles|lib|wolfbot)', r'File "/\1', variables[1]) + variables[1] = re.sub(r'File "[^"]*/(src|gamemodes|oyoyo|roles|[Ll]ib|wolfbot)', r'File "/\1', variables[1]) # sanitize values within local frames if len(variables) > 3: diff --git a/src/pregame.py b/src/pregame.py index 6dbed6df..14190ee6 100644 --- a/src/pregame.py +++ b/src/pregame.py @@ -346,7 +346,7 @@ def _isvalid(mode, allow_vote_only): if count == 0 or role in ingame_state.current_mode.SECONDARY_ROLES: continue - selected = random.sample(vils, count) + selected = random.sample(list(vils), count) for x in selected: ingame_state.main_roles[x] = role vils.remove(x)