Skip to content
Snippets Groups Projects
Commit 2c0de376 authored by Dariusz Kędzierski's avatar Dariusz Kędzierski
Browse files

Fix: assert for str type in get_id argument

parent abb9c05b
No related branches found
No related tags found
1 merge request!13Fix: assert for str type in get_id argument
......@@ -58,6 +58,7 @@ class Accounts:
@classmethod
def get_id(cls, name):
"""Get account id by name. Throw if not found."""
assert isinstance(name, str), "account name should be string"
assert name in cls._ids, "account does not exist or was not registered"
return cls._ids[name]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment