Changeset 36ab428 for python/lib
- Timestamp:
- Jul 12, 2019, 12:27:44 AM (5 years ago)
- Branches:
- feature/crepe_org
- Parents:
- befee7a (diff), 63fc1df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- python/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/gen_code.py
rbefee7a r36ab428 510 510 PyObject *type, *value, *traceback; 511 511 PyErr_Fetch(&type, &value, &traceback); 512 PyErr_Restore(PyExc_ValueError, value, traceback); 512 Py_XDECREF(type); 513 type = PyExc_ValueError; 514 Py_XINCREF(type); 515 PyErr_Restore(type, value, traceback); 513 516 }} 514 517 return NULL; -
python/lib/gen_external.py
rbefee7a r36ab428 121 121 proc = subprocess.Popen(cpp_cmd, 122 122 stderr=subprocess.PIPE, 123 stdout=subprocess.PIPE) 123 stdout=subprocess.PIPE, 124 universal_newlines=True) 124 125 assert proc, 'Proc was none' 125 126 cpp_output = proc.stdout.read() … … 127 128 if err_output: 128 129 print("Warning: preprocessor produced errors or warnings:\n%s" \ 129 % err_output .decode('utf8'))130 % err_output) 130 131 if not cpp_output: 131 132 raise_msg = "preprocessor output is empty! Running command " \ 132 133 + "\"%s\" failed" % " ".join(cpp_cmd) 133 134 if err_output: 134 raise_msg += " with stderr: \"%s\"" % err_output .decode('utf8')135 raise_msg += " with stderr: \"%s\"" % err_output 135 136 else: 136 137 raise_msg += " with no stdout or stderr" 137 138 raise Exception(raise_msg) 138 139 if not isinstance(cpp_output, list): 139 cpp_output = [l.strip() for l in cpp_output. decode('utf8').split('\n')]140 cpp_output = [l.strip() for l in cpp_output.split('\n')] 140 141 141 142 return cpp_output
Note: See TracChangeset
for help on using the changeset viewer.