aboutsummaryrefslogtreecommitdiff
path: root/textproc/google-ctemplate/files/patch-src_htmlparser_fsm__config.py
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/google-ctemplate/files/patch-src_htmlparser_fsm__config.py')
-rw-r--r--textproc/google-ctemplate/files/patch-src_htmlparser_fsm__config.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/textproc/google-ctemplate/files/patch-src_htmlparser_fsm__config.py b/textproc/google-ctemplate/files/patch-src_htmlparser_fsm__config.py
new file mode 100644
index 000000000000..4a4dd4c619d5
--- /dev/null
+++ b/textproc/google-ctemplate/files/patch-src_htmlparser_fsm__config.py
@@ -0,0 +1,15 @@
+--- src/htmlparser/fsm_config.py.orig 2020-09-26 14:52:15 UTC
++++ src/htmlparser/fsm_config.py
+@@ -210,7 +210,11 @@ class FSMConfig(object):
+
+ self.sm['state'] = self.AddState
+ self.sm['condition'] = self.AddCondition
+- execfile(filename, self.sm)
++
++ with open(filename) as f:
++ code = compile(f.read(), filename, 'exec')
++ exec(code, self.sm)
++
+ self.name = self.sm['name']
+ if not self.name.isalnum():
+ raise Exception("State machine name must consist of only alphanumeric"