mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-02-21 13:42:56 +00:00
Better messages when xdis not handling Python x.y
This commit is contained in:
parent
51ac72ba1f
commit
fa203af665
@ -83,7 +83,20 @@ class Token:
|
||||
self.pattr = None
|
||||
|
||||
if opc is None:
|
||||
from xdis.std import _std_api
|
||||
try:
|
||||
from xdis.std import _std_api
|
||||
except KeyError as e:
|
||||
print(f"I don't know about Python version {e} yet.")
|
||||
try:
|
||||
version_tuple = tuple(int(i) for i in str(e)[1:-1].split("."))
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
if version_tuple > (3, 9):
|
||||
print(f"Python versions 3.9 and greater are not supported.")
|
||||
else:
|
||||
print(f"xdis might need to be informed about version {e}")
|
||||
return
|
||||
|
||||
self.opc = _std_api.opc
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user