eric6/WebBrowser/SafeBrowsing/SafeBrowsingAPIClient.py

changeset 8205
4a0f1f896341
parent 8143
2c730d5fd177
child 8218
7c09585bd960
diff -r fd477cded1c1 -r 4a0f1f896341 eric6/WebBrowser/SafeBrowsing/SafeBrowsingAPIClient.py
--- a/eric6/WebBrowser/SafeBrowsing/SafeBrowsingAPIClient.py	Thu Apr 08 17:27:12 2021 +0200
+++ b/eric6/WebBrowser/SafeBrowsing/SafeBrowsingAPIClient.py	Thu Apr 08 18:27:47 2021 +0200
@@ -561,15 +561,16 @@
         """
         platform = platform.lower()
         
+        if platform not in ("linux", "windows", "macos"):
+            raise ValueError("Unsupported platform")
+        
         platformTypes = ["ANY_PLATFORM", "ALL_PLATFORMS"]
         if platform == "linux":
             platformTypes.append("LINUX")
         elif platform == "windows":
             platformTypes.append("WINDOWS")
-        elif platform == "macos":
+        else:
             platformTypes.append("OSX")
-        else:
-            raise ValueError("Unsupported platform")
         
         return platformTypes
     

eric ide

mercurial