src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityUtils.py

branch
eric7
changeset 10169
0f70a4ef4592
parent 9653
e67609152c5e
child 10372
1444b4bee64b
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityUtils.py	Tue Aug 29 16:55:01 2023 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityUtils.py	Tue Aug 29 16:55:18 2023 +0200
@@ -259,14 +259,14 @@
     """
     Function to build a string from an ast.BinOp chain.
 
-    This will build a string from a series of ast.Str/ast.Constant nodes
+    This will build a string from a series of ast.Constant nodes
     wrapped in ast.BinOp nodes. Something like "a" + "b" + "c" or "a %s" % val
     etc. The provided node can be any participant in the BinOp chain.
 
     @param node node to be processed
-    @type ast.BinOp or ast.Str/ast.Constant
+    @type ast.BinOp or ast.Constant
     @param stop base node to stop at
-    @type ast.BinOp or ast.Str/ast.Constant
+    @type ast.BinOp or ast.Constant
     @return tuple containing the root node of the expression and the string
         value
     @rtype tuple of (ast.AST, str)
@@ -291,7 +291,7 @@
     if isinstance(node, ast.BinOp):
         _get(node, bits, stop)
 
-    return (node, " ".join([x.s for x in bits if AstUtilities.isString(x)]))
+    return (node, " ".join([x.value for x in bits if AstUtilities.isString(x)]))
 
 
 def getCalledName(node):

eric ide

mercurial