Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

Commit

Permalink
checks
Browse files Browse the repository at this point in the history
  • Loading branch information
hugsy committed Jun 11, 2015
1 parent 5faaa31 commit 6b5748b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugin-python.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,10 @@ static int proxenet_python_initialize_function(plugin_t* plugin, req_t type)
}

if (plugin->pre_function && type == REQUEST) {
if(cfg->verbose)
xlog_python(LOG_WARNING, "Pre-hook function already defined for '%s'\n", plugin->name);
return 0;
}

if (plugin->post_function && type == RESPONSE) {
if(cfg->verbose)
xlog_python(LOG_WARNING, "Post-hook function already defined for '%s'\n", plugin->name);
return 0;
}

Expand Down Expand Up @@ -308,7 +304,7 @@ static char* proxenet_python_execute_function(PyObject* pFuncRef, request_t *req
}

pResult = PyObject_CallObject(pFuncRef, pArgs);
if (!pResult) {
if (!pResult || PyErr_Occurred()){
xlog_python(LOG_ERROR, "%s\n", "PyObject_CallObject() failed.");
PyErr_Print();
return NULL;
Expand Down

0 comments on commit 6b5748b

Please sign in to comment.