Mon, 15 Aug 2022 14:08:34 +0200
Fixed a few issues related to the use of pathlib.Path().glob().
src/eric7/WebBrowser/QtHelp/HelpDocsInstaller.py | file | annotate | diff | comparison | revisions | |
src/eric7/WebBrowser/Session/SessionManager.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/WebBrowser/QtHelp/HelpDocsInstaller.py Wed Aug 10 19:32:28 2022 +0200 +++ b/src/eric7/WebBrowser/QtHelp/HelpDocsInstaller.py Mon Aug 15 14:08:34 2022 +0200 @@ -199,7 +199,7 @@ docsPath = pathlib.Path( QLibraryInfo.path(QLibraryInfo.LibraryPath.DocumentationPath) ) - if not docsPath.is_dir() or len(docsPath.glob("*.qch")) == 0: + if not docsPath.is_dir() or len(list(docsPath.glob("*.qch"))) == 0: docsPath = ( docsPath.parents[2] / "Docs" / "Qt-{0}.{1}".format(*qVersionTuple()) ) @@ -207,7 +207,7 @@ # unsupported Qt version return False - files = docsPath.glob("*.qch") + files = list(docsPath.glob("*.qch")) if not files: engine.setCustomValue(versionKey, "|") return False @@ -271,7 +271,7 @@ docsPath = pathlib.Path(getConfig("ericDocDir")) / "Help" - files = docsPath.glob("*.qch") + files = list(docsPath.glob("*.qch")) if not files: engine.setCustomValue(versionKey, "|") return False
--- a/src/eric7/WebBrowser/Session/SessionManager.py Wed Aug 10 19:32:28 2022 +0200 +++ b/src/eric7/WebBrowser/Session/SessionManager.py Mon Aug 15 14:08:34 2022 +0200 @@ -323,7 +323,7 @@ if self.__sessionMetaData: return - sessionFiles = pathlib.Path(self.getSessionsDirectory()).glob("*.json") + sessionFiles = list(pathlib.Path(self.getSessionsDirectory()).glob("*.json")) for sessionFile in sessionFiles: sessionData = self.readSessionFromFile(sessionFile.resolve())