Debugger/DebugServer.py

changeset 539
87f9bce38a44
parent 501
5c615a85241a
child 541
00e1a5d060c5
equal deleted inserted replaced
538:7f1a56e80124 539:87f9bce38a44
12 from PyQt4.QtCore import * 12 from PyQt4.QtCore import *
13 from PyQt4.QtGui import QMessageBox 13 from PyQt4.QtGui import QMessageBox
14 from PyQt4.QtNetwork import QTcpServer, QHostAddress, QHostInfo 14 from PyQt4.QtNetwork import QTcpServer, QHostAddress, QHostInfo
15 15
16 from E5Gui.E5Application import e5App 16 from E5Gui.E5Application import e5App
17 from E5Gui import E5MessageBox
17 18
18 from .BreakPointModel import BreakPointModel 19 from .BreakPointModel import BreakPointModel
19 from .WatchPointModel import WatchPointModel 20 from .WatchPointModel import WatchPointModel
20 from . import DebugClientCapabilities 21 from . import DebugClientCapabilities
21 22
564 """ 565 """
565 sock = self.nextPendingConnection() 566 sock = self.nextPendingConnection()
566 peerAddress = sock.peerAddress().toString() 567 peerAddress = sock.peerAddress().toString()
567 if peerAddress not in Preferences.getDebugger("AllowedHosts"): 568 if peerAddress not in Preferences.getDebugger("AllowedHosts"):
568 # the peer is not allowed to connect 569 # the peer is not allowed to connect
569 res = QMessageBox.warning(None, 570 res = E5MessageBox.warning(None,
570 self.trUtf8("Connection from illegal host"), 571 self.trUtf8("Connection from illegal host"),
571 self.trUtf8("""<p>A connection was attempted by the""" 572 self.trUtf8("""<p>A connection was attempted by the"""
572 """ illegal host <b>{0}</b>. Accept this connection?</p>""")\ 573 """ illegal host <b>{0}</b>. Accept this connection?</p>""")\
573 .format(peerAddress), 574 .format(peerAddress),
574 QMessageBox.StandardButtons(\ 575 QMessageBox.StandardButtons(\

eric ide

mercurial