mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-29 15:55:04 +00:00
Fix Jupyter (#1223)
* Call PyErr_Print() in QtResImport() * Fix Jupyter
This commit is contained in:
parent
2208d3c134
commit
1f4339bed2
@ -1,2 +1,3 @@
|
||||
jupyter
|
||||
ipykernel==4.10.0
|
||||
pyzmq==17.1.2
|
||||
|
@ -55,9 +55,13 @@ PyObject *QtResGetCode(const char *name)
|
||||
PyObject *QtResImport(const char *name)
|
||||
{
|
||||
PyObject *codeObject = QtResGetCode(name);
|
||||
if (!codeObject)
|
||||
if (!codeObject) {
|
||||
return nullptr;
|
||||
}
|
||||
PyObject *module = PyImport_ExecCodeModule(name, codeObject);
|
||||
if (!module) {
|
||||
PyErr_Print();
|
||||
}
|
||||
Py_DECREF(codeObject);
|
||||
return module;
|
||||
}
|
||||
|
@ -1,6 +1,13 @@
|
||||
import json
|
||||
from _cutter import *
|
||||
from CutterBindings import *
|
||||
|
||||
try:
|
||||
from CutterBindings import *
|
||||
|
||||
def core():
|
||||
return CutterCore.instance()
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
def cmdj(command):
|
||||
@ -8,5 +15,3 @@ def cmdj(command):
|
||||
return json.loads(cmd(command))
|
||||
|
||||
|
||||
def core():
|
||||
return CutterCore.instance()
|
||||
|
Loading…
Reference in New Issue
Block a user