1
0
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:
jeremystretch
2021-11-05 08:45:57 -04:00
parent 8f1acb700d
commit 773fd47ca6
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,10 @@
## 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)

View File

@ -4,6 +4,7 @@ import os
import platform
import re
import socket
import sys
import warnings
from urllib.parse import urlsplit
@ -25,7 +26,7 @@ HOSTNAME = platform.node()
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Validate Python version
if platform.python_version_tuple() < ('3', '7'):
if sys.version_info < (3, 7):
raise RuntimeError(
f"NetBox requires Python 3.7 or higher (current: Python {platform.python_version()})"
)