diff options
author | Arjen Hiemstra <ahiemstra@heimr.nl> | 2016-02-10 15:52:05 +0300 |
---|---|---|
committer | Arjen Hiemstra <ahiemstra@heimr.nl> | 2016-02-10 15:55:52 +0300 |
commit | 041fa2b3592e015eebe779169c9d7f4565b3a788 (patch) | |
tree | d7afb00340cf69e9b8b9e0025987e8e8fe1d2a01 /cura_app.py | |
parent | 894624fc2dcd1adc9121b17e7ccc23cb3836ec4a (diff) |
Import Arcus before importing Cura (and PyQt5)
Workaround an issue on certain Linux systems that causes a race
condition between Arcus and PyQt5.
Contributes to CURA-434
Diffstat (limited to 'cura_app.py')
-rwxr-xr-x | cura_app.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/cura_app.py b/cura_app.py index 831582687c..e19147c5e5 100755 --- a/cura_app.py +++ b/cura_app.py @@ -12,15 +12,12 @@ def exceptHook(type, value, traceback): sys.excepthook = exceptHook -try: - from google.protobuf.pyext import _message -except ImportError: - pass -else: - os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "cpp" - -if True: # To make the code style checker stop complaining - import cura.CuraApplication +# Workaround for a race condition on certain systems where there +# is a race condition between Arcus and PyQt. Importing Arcus +# first seems to prevent Sip from going into a state where it +# tries to create PyQt objects on a non-main thread. +import Arcus +import cura.CuraApplication if sys.platform == "win32" and hasattr(sys, "frozen"): import os |