Skip to content

Commit

Permalink
Python 3.9 tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Dec 9, 2019
1 parent 67d1c9a commit fba3d2f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xdis/unmarshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def load_code_type(fp, magic_int, bytes_for_s=False, code_objects={}):
else:
co_argcount = unpack("<i", fp.read(4))[0]

if magic_int in (3412, 3413):
if magic_int in (3412, 3413, 3422):
co_posonlyargcount = unpack("<i", fp.read(4))[0]
else:
co_posonlyargcount = None
Expand Down Expand Up @@ -794,7 +794,6 @@ def load_code_internal(fp, magic_int, bytes_for_s=False, code_objects={}):
global internStrings, internObjects

b1 = ord(fp.read(1))

save_ref = False
if b1 & FLAG_REF:
# Since 3.4, "flag" is the marshal.c name
Expand Down

0 comments on commit fba3d2f

Please sign in to comment.