Changeset 08d07ce for python/lib
- Timestamp:
- Jun 29, 2019, 1:14:08 PM (6 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/timestretch, fix/ffmpeg5, master
- Children:
- 3a83821
- Parents:
- 9279ba0 (diff), 2244f00 (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
r9279ba0 r08d07ce 524 524 PyObject *type, *value, *traceback; 525 525 PyErr_Fetch(&type, &value, &traceback); 526 PyErr_Restore(PyExc_ValueError, value, traceback); 526 Py_XDECREF(type); 527 type = PyExc_ValueError; 528 Py_XINCREF(type); 529 PyErr_Restore(type, value, traceback); 527 530 }} 528 531 return NULL; -
python/lib/gen_external.py
r9279ba0 r08d07ce 122 122 proc = subprocess.Popen(cpp_cmd, 123 123 stderr=subprocess.PIPE, 124 stdout=subprocess.PIPE) 124 stdout=subprocess.PIPE, 125 universal_newlines=True) 125 126 assert proc, 'Proc was none' 126 127 cpp_output = proc.stdout.read() … … 128 129 if err_output: 129 130 print("Warning: preprocessor produced errors or warnings:\n%s" \ 130 % err_output .decode('utf8'))131 % err_output) 131 132 if not cpp_output: 132 133 raise_msg = "preprocessor output is empty! Running command " \ 133 134 + "\"%s\" failed" % " ".join(cpp_cmd) 134 135 if err_output: 135 raise_msg += " with stderr: \"%s\"" % err_output .decode('utf8')136 raise_msg += " with stderr: \"%s\"" % err_output 136 137 else: 137 138 raise_msg += " with no stdout or stderr" 138 139 raise Exception(raise_msg) 139 140 if not isinstance(cpp_output, list): 140 cpp_output = [l.strip() for l in cpp_output. decode('utf8').split('\n')]141 cpp_output = [l.strip() for l in cpp_output.split('\n')] 141 142 142 143 return cpp_output
Note: See TracChangeset
for help on using the changeset viewer.