From 1b9ff22abb2bae74610b4b6159be3cb8d1dc245c Mon Sep 17 00:00:00 2001 From: osamacis Date: Fri, 21 Oct 2022 15:58:20 +0530 Subject: [PATCH] Add python3 compatibility variable --- src/bitmessagekivy/baseclass/network.py | 2 +- src/state.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bitmessagekivy/baseclass/network.py b/src/bitmessagekivy/baseclass/network.py index 18c417aa..da5ea492 100644 --- a/src/bitmessagekivy/baseclass/network.py +++ b/src/bitmessagekivy/baseclass/network.py @@ -13,7 +13,7 @@ from kivy.uix.screenmanager import Screen from pybitmessage import state -if os.environ.get('INSTALL_TESTS', False): +if os.environ.get('INSTALL_TESTS', False) and not state.backend_py3_compatible: from pybitmessage.mock import kivy_main stats = kivy_main.network.stats objectracker = kivy_main.network.objectracker diff --git a/src/state.py b/src/state.py index 7890654e..cac5db19 100644 --- a/src/state.py +++ b/src/state.py @@ -69,3 +69,5 @@ ackdataForWhichImWatching = {} thisapp = None """Singleton instance""" + +backend_py3_compatible = False