Fix import error, still have const warnings.

Implement mark_read
This commit is contained in:
Vincent Castellano 2015-05-13 00:55:08 -07:00
parent 5131593da4
commit c9f38274f5

View File

@ -1317,10 +1317,10 @@ void py_init (const char *file) {
PyList_Append(sysPath, PyUnicode_FromString(dirname(filename)));
// remove .py extension from file, if any
char* dot = strrchr(filename, '.');
char* dot = strrchr(file, '.');
if (dot && strcmp(dot, ".py") == 0)
*dot = 0;
pModule = PyImport_Import(PyUnicode_FromString(basename(filename)));
pModule = PyImport_Import(PyUnicode_FromString(basename(file)));
if(pModule == NULL || PyErr_Occurred()) { // Error loading script
logprintf("Failed to load python script\n");