diff options
author | Freeyorp <TheFreeYorp+git@gmail.com> | 2024-06-05 20:09:57 +0000 |
---|---|---|
committer | Freeyorp <TheFreeYorp+git@gmail.com> | 2024-06-05 23:57:13 +0000 |
commit | 9903d45c343fe51309075674c96b4411b6e1a002 (patch) | |
tree | dd5a2d445a1b4598f26803aeed73a36c016a4869 /src | |
parent | f5500cd949e6db20813c3bbec9cef66284866209 (diff) | |
download | tmwa-9903d45c343fe51309075674c96b4411b6e1a002.tar.gz tmwa-9903d45c343fe51309075674c96b4411b6e1a002.tar.bz2 tmwa-9903d45c343fe51309075674c96b4411b6e1a002.tar.xz tmwa-9903d45c343fe51309075674c96b4411b6e1a002.zip |
python3: Add explicit list()s for python3.6
This should be reverted once we drop support for Ubuntu 18.04, and therefore
python3.6, as it does clutter up the code a bit.
Sourced from specing's work on the porting process.
See https://git.themanaworld.org/legacy/tmwa/-/merge_requests/256
Diffstat (limited to 'src')
-rw-r--r-- | src/main-gdb-head.py | 2 | ||||
-rw-r--r-- | src/map/script-parse.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main-gdb-head.py b/src/main-gdb-head.py index a465c97..09e22fe 100644 --- a/src/main-gdb-head.py +++ b/src/main-gdb-head.py @@ -5,7 +5,7 @@ # gdb sticks everything in one scope. # This lets us enumerate what *we* added. -initial_globals = {id(v):v for v in globals().values()} +initial_globals = {id(v):v for v in list(globals().values())} import re diff --git a/src/map/script-parse.py b/src/map/script-parse.py index 199e348..3346b92 100644 --- a/src/map/script-parse.py +++ b/src/map/script-parse.py @@ -106,7 +106,7 @@ class ScriptBuffer(object): code_begin = code['_M_impl']['_M_start'] code_end = code['_M_impl']['_M_finish'] code_size = int(code_end - code_begin) - r = iter(range(code_size)) + r = iter(list(range(code_size))) for i in r: buf = [] for label in labels_dict.get(i, []): |