14 |
14 |
15 import collections |
15 import collections |
16 import os |
16 import os |
17 import re |
17 import re |
18 |
18 |
19 from PyQt6.QtCore import QObject, QUrl, QFile, QFileInfo, QIODevice, qWarning |
19 from PyQt6.QtCore import QObject, QUrl, QFile, QIODevice, qWarning |
20 |
20 |
21 from EricWidgets import EricMessageBox |
21 from EricWidgets import EricMessageBox |
22 |
22 |
23 |
23 |
24 class EricTldHostParts: |
24 class EricTldHostParts: |
269 return |
269 return |
270 |
270 |
271 dataFileName = "" |
271 dataFileName = "" |
272 parsedDataFileExist = False |
272 parsedDataFileExist = False |
273 |
273 |
274 for path in self.__dataSearchPaths: |
274 for searchPath in self.__dataSearchPaths: |
275 dataFileName = ( |
275 dataFileName = os.path.abspath( |
276 QFileInfo(path + "/effective_tld_names.dat").absoluteFilePath() |
276 os.path.join(searchPath, "effective_tld_names.dat") |
277 ) |
277 ) |
278 if QFileInfo(dataFileName).exists(): |
278 if os.path.exists(dataFileName): |
279 parsedDataFileExist = True |
279 parsedDataFileExist = True |
280 break |
280 break |
281 |
281 |
282 if not parsedDataFileExist: |
282 if not parsedDataFileExist: |
283 tldDataFileDownloadLink = ( |
283 tldDataFileDownloadLink = ( |
451 |
451 |
452 testDataFileName = "" |
452 testDataFileName = "" |
453 testDataFileExist = False |
453 testDataFileExist = False |
454 |
454 |
455 for path in self.__dataSearchPaths: |
455 for path in self.__dataSearchPaths: |
456 testDataFileName = ( |
456 testDataFileName = os.path.abspath( |
457 QFileInfo(path + "/test_psl.txt").absoluteFilePath() |
457 os.path.join(path, "test_psl.txt") |
458 ) |
458 ) |
459 if QFileInfo(testDataFileName).exists(): |
459 if os.path.exists(testDataFileName): |
460 testDataFileExist = True |
460 testDataFileExist = True |
461 break |
461 break |
462 |
462 |
463 if not testDataFileExist: |
463 if not testDataFileExist: |
464 testFileDownloadLink = ( |
464 testFileDownloadLink = ( |