Skip to content

Commit d42f3c5

Browse files
Check for unconnected backend
1 parent 6cb3c9c commit d42f3c5

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

pyqode/python/modes/goto_assignements.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import os
77
from pyqode.qt import QtCore, QtGui, QtWidgets
88
from pyqode.core.api import Mode, TextHelper, DelayJobRunner
9+
from pyqode.core.backend import NotConnected
910
from pyqode.core.modes import WordClickMode
1011
from pyqode.python.backend import workers
1112

@@ -103,9 +104,12 @@ def _check_word_cursor(self, tc=None):
103104
'path': self.editor.file.path,
104105
'encoding': self.editor.file.encoding
105106
}
106-
self.editor.backend.send_request(
107-
workers.goto_assignments, request_data,
108-
on_receive=self._on_results_available)
107+
try:
108+
self.editor.backend.send_request(
109+
workers.goto_assignments, request_data,
110+
on_receive=self._on_results_available)
111+
except NotConnected:
112+
pass
109113

110114
def _goto(self, definition):
111115
print('goto', definition.module_path, definition.line,

0 commit comments

Comments
 (0)