eric6/E5Network/E5TldExtractor.py

changeset 7775
4a1db75550bd
parent 7717
f32d7965a17e
child 7923
91e843545d9a
--- a/eric6/E5Network/E5TldExtractor.py	Sat Oct 10 16:03:53 2020 +0200
+++ b/eric6/E5Network/E5TldExtractor.py	Sun Oct 11 17:54:52 2020 +0200
@@ -14,8 +14,9 @@
 
 import collections
 import os
+import re
 
-from PyQt5.QtCore import QObject, QUrl, QFile, QFileInfo, QRegExp, qWarning
+from PyQt5.QtCore import QObject, QUrl, QFile, QFileInfo, qWarning
 
 from E5Gui import E5MessageBox
 
@@ -481,7 +482,7 @@
         if not file.open(QFile.ReadOnly | QFile.Text):
             return False
         
-        testRegExp = QRegExp(
+        testRegExp = re.compile(
             "checkPublicSuffix\\(('([^']+)'|null), ('([^']+)'|null)\\);")
         allTestSuccess = True
         
@@ -490,11 +491,11 @@
             if not line or line.startswith("//"):
                 continue
             
-            if testRegExp.indexIn(line) == -1:
+            match = testRegExp.search(line)
+            if match is None:
                 allTestSuccess = False
             else:
-                hostName = testRegExp.cap(2)
-                registrableName = testRegExp.cap(4)
+                hostName, registrableName = match.group(2, 4)
                 
                 if not self.__checkPublicSuffix(hostName, registrableName):
                     allTestSuccess = False

eric ide

mercurial