diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-10-16 20:00:00 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-10-16 20:00:00 (GMT) |
commit | 5fcd4f54c5ca87ca9dfd9529d7b83bbec9aff64a (patch) | |
tree | 033981b0662791abf274ad33b4f33d47c3437382 /plugins/pychrysa/analysis | |
parent | a30fc1056877860593c19498738775c0ac43794d (diff) |
Prevented some mistakes pointed by Melkor.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@599 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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); |