diff options
Diffstat (limited to 'plugins/pychrysa/analysis')
-rw-r--r-- | plugins/pychrysa/analysis/binary.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/pychrysa/analysis/binary.c b/plugins/pychrysa/analysis/binary.c index 9e45e27..93b1c57 100644 --- a/plugins/pychrysa/analysis/binary.c +++ b/plugins/pychrysa/analysis/binary.c @@ -28,6 +28,9 @@ #include <pygobject.h> +#include <i18n.h> + + #include <analysis/binary.h> @@ -82,7 +85,11 @@ static PyObject *py_loaded_binary_new(PyTypeObject *type, PyObject *args, PyObje if (!ret) return NULL; ret = PyObject_IsInstance(content_obj, (PyObject *)get_python_binary_content_type()); - if (!ret) return NULL; + if (ret == 0) + { + PyErr_SetString(PyExc_TypeError, _("Expected a BinContent as argument")); + return NULL; + } content = G_BIN_CONTENT(pygobject_get(content_obj)); binary = g_loaded_binary_new(content); |