diff --git a/demo.py b/demo.py index f409ffe..e692bec 100644 --- a/demo.py +++ b/demo.py @@ -2,6 +2,7 @@ import json import logging import os import threading +import platform import time import traceback from base64 import b64decode, b64encode @@ -11,6 +12,11 @@ import datetime from rich.logging import RichHandler +minor_version = int(platform.python_version().split('.')[1]) + + if minor_version < 10 or minor_version > 11: + raise Exception(f"Incompatible Python version '{platform.python_version()}'") + import apns import ids import imessage