Browse Source

cppcms_tmpl_cc:

The shebang line at the top resolves to python3 on some sytems. This causes the import request to StringIO to fail with a ModuleNotFoundError.
master
mgavin 5 years ago
parent
commit
ddc23a101b
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      bin/cppcms_tmpl_cc

+ 6
- 3
bin/cppcms_tmpl_cc View File

@@ -11,7 +11,10 @@
import os
import re
import sys
import StringIO
try:
from StringIO import StringIO
except ModuleNotFoundError: # StringIO moved to io in python 3
from io import StringIO

str_match=r'"([^"\\]|\\[^"]|\\")*"'
single_var_param_match=r'(?:-?\d+|"(?:[^"\\]|\\[^"]|\\")*")'
@@ -1244,8 +1247,8 @@ view_created=False
scope_filter='cppcms::filters::escape'

view_name = ''
declarations = StringIO.StringIO();
definitions = StringIO.StringIO();
declarations = StringIO();
definitions = StringIO();
inline_cpp_to = output_declaration
inline_templates = "default"
output_template = output_definition


Loading…
Cancel
Save