diff --git a/pype/tools/pyblish_pype/control.py b/pype/tools/pyblish_pype/control.py index d73c7efad7..0162848f2b 100644 --- a/pype/tools/pyblish_pype/control.py +++ b/pype/tools/pyblish_pype/control.py @@ -9,10 +9,8 @@ import os import sys import traceback import inspect -import threading -import six -from Qt import QtCore, QtWidgets +from Qt import QtCore import pyblish.api import pyblish.util @@ -30,27 +28,6 @@ class IterationBreak(Exception): pass -class ProcessThread(threading.Thread): - def __init__(self, plugin, context, instance): - super(ProcessThread, self).__init__() - - self.result = None - self.exception = None - - self.plugin = plugin - self.context = context - self.instance = instance - - def run(self): - try: - result = pyblish.plugin.process( - self.plugin, self.context, self.instance - ) - self.result = result - except Exception: - self.exception = sys.exc_info() - - class Controller(QtCore.QObject): # Emitted when the GUI is about to start processing; # e.g. resetting, validating or publishing. @@ -254,16 +231,7 @@ class Controller(QtCore.QObject): self.processing["nextOrder"] = plugin.order try: - thread = ProcessThread(plugin, self.context, instance) - thread.start() - while thread.isAlive(): - QtWidgets.QApplication.processEvents() - - thread.join() - if thread.exception: - six.reraise(*thread.exception) - - result = thread.result + result = pyblish.plugin.process(plugin, self.context, instance) # Make note of the order at which the # potential error error occured. if result["error"] is not None: