Preferences/ConfigurationPages/DebuggerGeneralPage.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3010
befeff46ec0f
child 3058
0a02c433f52d
--- a/Preferences/ConfigurationPages/DebuggerGeneralPage.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Preferences/ConfigurationPages/DebuggerGeneralPage.py	Fri Oct 18 23:00:41 2013 +0200
@@ -56,7 +56,8 @@
             self.consoleDbgEdit.setWhatsThis(t)
         
         self.consoleDbgCompleter = E5FileCompleter(self.consoleDbgEdit)
-        self.dbgTranslationLocalCompleter = E5DirCompleter(self.dbgTranslationLocalEdit)
+        self.dbgTranslationLocalCompleter = E5DirCompleter(
+            self.dbgTranslationLocalEdit)
         
         # set initial values
         interfaces = []
@@ -65,11 +66,13 @@
             addressEntries = networkInterface.addressEntries()
             if len(addressEntries) > 0:
                 for addressEntry in addressEntries:
-                    if ":" in addressEntry.ip().toString() and not socket.has_ipv6:
+                    if ":" in addressEntry.ip().toString() and \
+                            not socket.has_ipv6:
                         continue    # IPv6 not supported by Python
-                    interfaces.append("{0} ({1})"\
-                                      .format(networkInterface.humanReadableName(),
-                                              addressEntry.ip().toString()))
+                    interfaces.append(
+                        "{0} ({1})".format(
+                            networkInterface.humanReadableName(),
+                            addressEntry.ip().toString()))
         self.interfacesCombo.addItems(interfaces)
         interface = Preferences.getDebugger("NetworkInterface")
         if not socket.has_ipv6:
@@ -85,7 +88,8 @@
             self.selectedInterfaceButton.setChecked(True)
             index = -1
             for i in range(len(interfaces)):
-                if QRegExp(".*{0}.*".format(interface)).exactMatch(interfaces[i]):
+                if QRegExp(".*{0}.*".format(interface))\
+                        .exactMatch(interfaces[i]):
                     index = i
                     break
             self.interfacesCombo.setCurrentIndex(index)
@@ -227,8 +231,10 @@
             else:
                 E5MessageBox.critical(self,
                     self.trUtf8("Add allowed host"),
-                    self.trUtf8("""<p>The entered address <b>{0}</b> is not"""
-                        """ a valid IP v4 or IP v6 address. Aborting...</p>""")\
+                    self.trUtf8(
+                        """<p>The entered address <b>{0}</b> is not"""
+                        """ a valid IP v4 or IP v6 address."""
+                        """ Aborting...</p>""")\
                         .format(allowedHost))
         
     @pyqtSlot()
@@ -257,8 +263,10 @@
             else:
                 E5MessageBox.critical(self,
                     self.trUtf8("Edit allowed host"),
-                    self.trUtf8("""<p>The entered address <b>{0}</b> is not"""
-                        """ a valid IP v4 or IP v6 address. Aborting...</p>""")\
+                    self.trUtf8(
+                        """<p>The entered address <b>{0}</b> is not"""
+                        """ a valid IP v4 or IP v6 address."""
+                        """ Aborting...</p>""")\
                         .format(allowedHost))
     
 
@@ -267,6 +275,7 @@
     Module function to create the configuration page.
     
     @param dlg reference to the configuration dialog
+    @return reference to the instantiated page (ConfigurationPageBase)
     """
     page = DebuggerGeneralPage()
     return page

eric ide

mercurial