We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dffaea commit ea9cc2fCopy full SHA for ea9cc2f
Python/pythonrun.nim
@@ -251,12 +251,15 @@ template PyRun_String*(str; mode; globals; locals): PyObject =
251
bind PyRun_StringFlags
252
PyRun_StringFlags(str, mode, globals, locals)
253
254
-template errPrint(dict; call){.dirty.} =
+template errPrint(dict; call): bool{.dirty.} =
255
let dict = getMainDict()
256
let res = call
257
if res.isThrownException:
258
let exc = PyBaseErrorObject(res)
259
PyErr_Print exc
260
+ false
261
+ else:
262
+ true
263
264
proc PyRun_SimpleStringFlagsWithName*(str; name: string, flags=initPyCompilerFlags()): bool{.pyCFuncPragma.} =
265
## `_PyRun_SimpleStringFlagsWithName`
0 commit comments