siphon used cgi.escape which was deprecated in python 3.2 and
removed in python 3.8.
Update the code to use html.escape instead.
Type: fix
Change-Id: I3192e3f69a4a95fe23cb24e1c29194ba5310932b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-import cgi, pyparsing as pp
+import html
+import pyparsing as pp
# Some useful primitives
ident = pp.Word(pp.alphas + "_", pp.alphas + pp.nums + "_")
# Some useful primitives
ident = pp.Word(pp.alphas + "_", pp.alphas + pp.nums + "_")
"""
Parser for our struct initializers which are composed from a
"""
Parser for our struct initializers which are composed from a
-function-like macro, equals sign, and then a normal C struct initalizer
+function-like macro, equals sign, and then a normal C struct initializer
block.
"""
class MacroInitializer(ParserFunctionMacro):
block.
"""
class MacroInitializer(ParserFunctionMacro):
- r["value"][param[0]] = cgi.escape(param[1])
+ r["value"][param[0]] = html.escape(param[1])