From da885d595a7b7865c98d5c72bcb51cd883925f2d Mon Sep 17 00:00:00 2001 From: Vincent Castellano Date: Mon, 18 May 2015 14:31:59 -0700 Subject: [PATCH] Clean up msgs and newlines --- python-tg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python-tg.c b/python-tg.c index a0891f6..081c9b3 100644 --- a/python-tg.c +++ b/python-tg.c @@ -483,7 +483,8 @@ void py_our_id (int id) { arglist = Py_BuildValue("(i)", id); result = PyEval_CallObject(_py_our_id, arglist); - Py_DECREF(arglist); if(result == NULL) + Py_DECREF(arglist); + if(result == NULL) PyErr_Print(); else if(PyUnicode_Check(result)) logprintf ("python: %s\n", PyBytes_AsString(PyUnicode_AsASCIIString(result))); @@ -1338,6 +1339,6 @@ void py_init (const char *file) { python_loaded = 1; PyDateTime_IMPORT; - logprintf("Python Initialized"); + logprintf("Python Initialized\n"); }