eric7/Toolbox/SingleApplication.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8322
b422b4e77d19
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
10 import json 10 import json
11 11
12 from PyQt6.QtCore import QByteArray 12 from PyQt6.QtCore import QByteArray
13 from PyQt6.QtNetwork import QLocalServer, QLocalSocket 13 from PyQt6.QtNetwork import QLocalServer, QLocalSocket
14 14
15 from E5Gui import E5MessageBox 15 from E5Gui import EricMessageBox
16 16
17 import Utilities 17 import Utilities
18 18
19 19
20 class SingleApplicationServer(QLocalServer): 20 class SingleApplicationServer(QLocalServer):
65 ## print(line) ## debug # __IGNORE_WARNING_M891__ 65 ## print(line) ## debug # __IGNORE_WARNING_M891__
66 66
67 try: 67 try:
68 commandDict = json.loads(line.strip()) 68 commandDict = json.loads(line.strip())
69 except (TypeError, ValueError) as err: 69 except (TypeError, ValueError) as err:
70 E5MessageBox.critical( 70 EricMessageBox.critical(
71 None, 71 None,
72 self.tr("Single Application Protocol Error"), 72 self.tr("Single Application Protocol Error"),
73 self.tr("""<p>The response received from the single""" 73 self.tr("""<p>The response received from the single"""
74 """ application client could not be decoded.""" 74 """ application client could not be decoded."""
75 """ Please report this issue with the received""" 75 """ Please report this issue with the received"""
76 """ data to the eric bugs email address.</p>""" 76 """ data to the eric bugs email address.</p>"""
77 """<p>Error: {0}</p>""" 77 """<p>Error: {0}</p>"""
78 """<p>Data:<br/>{1}</p>""").format( 78 """<p>Data:<br/>{1}</p>""").format(
79 str(err), Utilities.html_encode(line.strip())), 79 str(err), Utilities.html_encode(line.strip())),
80 E5MessageBox.Ok) 80 EricMessageBox.Ok)
81 return 81 return
82 82
83 command = commandDict["command"] 83 command = commandDict["command"]
84 arguments = commandDict["arguments"] 84 arguments = commandDict["arguments"]
85 85

eric ide

mercurial