--- a/eric6/WebBrowser/Bookmarks/BookmarksImporters/IExplorerImporter.py Thu Apr 08 17:27:12 2021 +0200 +++ b/eric6/WebBrowser/Bookmarks/BookmarksImporters/IExplorerImporter.py Thu Apr 08 18:27:47 2021 +0200 @@ -28,29 +28,29 @@ (string) @exception ValueError raised to indicate an invalid browser ID """ - if sourceId == "ie": - if Globals.isWindowsPlatform(): - standardDir = os.path.expandvars( - "%USERPROFILE%\\Favorites") - else: - standardDir = "" - return ( - UI.PixmapCache.getPixmap("internet_explorer"), - "Internet Explorer", - "", - QCoreApplication.translate( - "IExplorerImporter", - """Internet Explorer stores its bookmarks in the""" - """ <b>Favorites</b> folder This folder is usually""" - """ located in"""), - QCoreApplication.translate( - "IExplorerImporter", - """Please choose the folder to begin importing bookmarks."""), - standardDir, - ) - else: + if sourceId != "ie": raise ValueError( "Unsupported browser ID given ({0}).".format(sourceId)) + + if Globals.isWindowsPlatform(): + standardDir = os.path.expandvars( + "%USERPROFILE%\\Favorites") + else: + standardDir = "" + return ( + UI.PixmapCache.getPixmap("internet_explorer"), + "Internet Explorer", + "", + QCoreApplication.translate( + "IExplorerImporter", + """Internet Explorer stores its bookmarks in the""" + """ <b>Favorites</b> folder This folder is usually""" + """ located in"""), + QCoreApplication.translate( + "IExplorerImporter", + """Please choose the folder to begin importing bookmarks."""), + standardDir, + ) class IExplorerImporter(BookmarksImporter):