From a72aaf12cab6acfdab350f7dae6c1831e974c0e6 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 12 Jan 2022 10:07:44 +0100 Subject: [PATCH] Platform version check for Windows --- RNS/Reticulum.py | 2 ++ RNS/vendor/platformutils.py | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index 018c533..95096db 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -116,6 +116,8 @@ class Reticulum: :param configdir: Full path to a Reticulum configuration directory. """ + RNS.vendor.platformutils.platform_checks() + if configdir != None: Reticulum.configdir = configdir diff --git a/RNS/vendor/platformutils.py b/RNS/vendor/platformutils.py index 6ce0aca..8743dc1 100644 --- a/RNS/vendor/platformutils.py +++ b/RNS/vendor/platformutils.py @@ -4,4 +4,13 @@ def get_platform(): return 'android' else: import sys - return sys.platform \ No newline at end of file + return sys.platform + +def platform_checks(): + if str(get_platform()).startswith("win32"): + if sys.version_info.major >= 3 and sys.version_info.minor >= 8: + pass + else: + RNS.log("On Windows, Reticulum requires Python 3.8 or higher.") + RNS.log("Please update Python to run Reticulum.") + RNS.panic() \ No newline at end of file