Skip to content

Commit 0dce49d

Browse files
committed
Do not show TestRunnerAgent import errors on startup
1 parent e5d7cef commit 0dce49d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/robotide/contrib/testrunner/TestRunnerAgent.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@
4646
import threading
4747
import SocketServer
4848

49-
from robot.errors import ExecutionFailed
50-
from robot.running import EXECUTION_CONTEXTS
51-
from robot.running.signalhandler import STOP_SIGNAL_MONITOR
52-
from robot.utils import encoding
49+
try:
50+
from robot.errors import ExecutionFailed
51+
from robot.running import EXECUTION_CONTEXTS
52+
from robot.running.signalhandler import STOP_SIGNAL_MONITOR
53+
from robot.utils import encoding
54+
except ImportError:
55+
encoding = None
56+
5357

5458
if sys.hexversion > 0x2060000:
5559
import json
@@ -76,7 +80,8 @@
7680
# Setting Output encoding to UTF-8 and ignoring the platform specs
7781
# RIDE will expect UTF-8
7882
# Set output encoding to UTF-8 for piped output streams
79-
encoding.OUTPUT_ENCODING = 'UTF-8'
83+
if encoding:
84+
encoding.OUTPUT_ENCODING = 'UTF-8'
8085

8186

8287
def _is_logged(level):

0 commit comments

Comments
 (0)