mirror of
https://github.com/JJTech0130/pypush.git
synced 2025-01-22 19:30:56 +00:00
Add Python version check (#56)
This commit is contained in:
parent
e0795e8f72
commit
3591857334
6
demo.py
6
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
|
||||
|
Loading…
Reference in New Issue
Block a user