eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/insecureSslTls.py

changeset 8222
5994b80b8760
parent 7923
91e843545d9a
child 8259
2bbec88047dd
diff -r 0572a215bd2f -r 5994b80b8760 eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/insecureSslTls.py
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/insecureSslTls.py	Sun Apr 11 16:53:48 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/insecureSslTls.py	Sun Apr 11 18:45:10 2021 +0200
@@ -138,16 +138,18 @@
     @param config dictionary with configuration data
     @type dict
     """
-    if context.callFunctionNameQual == 'ssl.wrap_socket':
-        if context.checkCallArgValue('ssl_version') is None:
-            # checkCallArgValue() returns False if the argument is found
-            # but does not match the supplied value (or the default None).
-            # It returns None if the argument passed doesn't exist. This
-            # tests for that (ssl_version is not specified).
-            reportError(
-                context.node.lineno - 1,
-                context.node.col_offset,
-                "S504",
-                "L",
-                "M",
-            )
+    if (
+        context.callFunctionNameQual == 'ssl.wrap_socket' and
+        context.checkCallArgValue('ssl_version') is None
+    ):
+        # checkCallArgValue() returns False if the argument is found
+        # but does not match the supplied value (or the default None).
+        # It returns None if the argument passed doesn't exist. This
+        # tests for that (ssl_version is not specified).
+        reportError(
+            context.node.lineno - 1,
+            context.node.col_offset,
+            "S504",
+            "L",
+            "M",
+        )

eric ide

mercurial