Skip to content
Snippets Groups Projects
Verified Commit 24b9bc38 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Fix Python 2 vs. 3.

parent a4902f86
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ def get_dict(value: Any, arg: Any) -> Any:
if hasattr(value, str(arg)):
return getattr(value, arg)
elif hasattr(value, 'has_key') and value.has_key(arg):
elif hasattr(value, 'keys') and arg in value.keys():
return value[arg]
elif str(arg).isnumeric() and len(value) > int(arg):
return value[int(arg)]
......
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