eric6/WebBrowser/Bookmarks/BookmarksImporters/OperaImporter.py

changeset 8205
4a0f1f896341
parent 8143
2c730d5fd177
child 8218
7c09585bd960
--- a/eric6/WebBrowser/Bookmarks/BookmarksImporters/OperaImporter.py	Thu Apr 08 17:27:12 2021 +0200
+++ b/eric6/WebBrowser/Bookmarks/BookmarksImporters/OperaImporter.py	Thu Apr 08 18:27:47 2021 +0200
@@ -28,30 +28,30 @@
         (string)
     @exception ValueError raised to indicate an invalid browser ID
     """
-    if sourceId == "opera":
-        if Globals.isWindowsPlatform():
-            standardDir = os.path.expandvars("%APPDATA%\\Opera\\Opera")
-        elif Globals.isMacPlatform():
-            standardDir = os.path.expanduser(
-                "~/Library/Opera")
-        else:
-            standardDir = os.path.expanduser("~/.opera")
-        return (
-            UI.PixmapCache.getPixmap("opera"),
-            "Opera",
-            "bookmarks.adr",
-            QCoreApplication.translate(
-                "OperaImporter",
-                """Opera stores its bookmarks in the <b>bookmarks.adr</b> """
-                """text file. This file is usually located in"""),
-            QCoreApplication.translate(
-                "OperaImporter",
-                """Please choose the file to begin importing bookmarks."""),
-            standardDir,
-        )
-    else:
+    if sourceId != "opera":
         raise ValueError(
             "Unsupported browser ID given ({0}).".format(sourceId))
+    
+    if Globals.isWindowsPlatform():
+        standardDir = os.path.expandvars("%APPDATA%\\Opera\\Opera")
+    elif Globals.isMacPlatform():
+        standardDir = os.path.expanduser(
+            "~/Library/Opera")
+    else:
+        standardDir = os.path.expanduser("~/.opera")
+    return (
+        UI.PixmapCache.getPixmap("opera"),
+        "Opera",
+        "bookmarks.adr",
+        QCoreApplication.translate(
+            "OperaImporter",
+            """Opera stores its bookmarks in the <b>bookmarks.adr</b> """
+            """text file. This file is usually located in"""),
+        QCoreApplication.translate(
+            "OperaImporter",
+            """Please choose the file to begin importing bookmarks."""),
+        standardDir,
+    )
 
 
 class OperaImporter(BookmarksImporter):

eric ide

mercurial