mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #7752: Fix minimum version check under Python v3.10
This commit is contained in:
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## v3.0.10 (FUTURE)
|
## v3.0.10 (FUTURE)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* [#7752](https://github.com/netbox-community/netbox/issues/7752) - Fix minimum version check under Python v3.10
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## v3.0.9 (2021-11-03)
|
## v3.0.9 (2021-11-03)
|
||||||
|
@ -4,6 +4,7 @@ import os
|
|||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
from urllib.parse import urlsplit
|
from urllib.parse import urlsplit
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ HOSTNAME = platform.node()
|
|||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
# Validate Python version
|
# Validate Python version
|
||||||
if platform.python_version_tuple() < ('3', '7'):
|
if sys.version_info < (3, 7):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
f"NetBox requires Python 3.7 or higher (current: Python {platform.python_version()})"
|
f"NetBox requires Python 3.7 or higher (current: Python {platform.python_version()})"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user