plugins: python-renderer: Remove unneeded file exists function
This commit is contained in:
parent
dc32499ad7
commit
a60fe6543e
@ -39,20 +39,6 @@
|
|||||||
*/
|
*/
|
||||||
static PyObject *p_module = NULL;
|
static PyObject *p_module = NULL;
|
||||||
|
|
||||||
static int check_file_exists(const char *path)
|
|
||||||
{
|
|
||||||
FILE *file;
|
|
||||||
int ret = -1;
|
|
||||||
|
|
||||||
file = fopen(path, "rb");
|
|
||||||
if (file) {
|
|
||||||
fclose(file);
|
|
||||||
ret = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
|
int FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -112,11 +98,6 @@ int FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *ve
|
|||||||
PyList_Append(p_sys_path, p_cwd_string);
|
PyList_Append(p_sys_path, p_cwd_string);
|
||||||
Py_DECREF(p_cwd_string);
|
Py_DECREF(p_cwd_string);
|
||||||
|
|
||||||
/* This renderer has only one parameter: The name of the file */
|
|
||||||
/*if (check_file_exists(params))
|
|
||||||
return -1001;
|
|
||||||
*/
|
|
||||||
|
|
||||||
p_name = PyUnicode_DecodeFSDefault(params);
|
p_name = PyUnicode_DecodeFSDefault(params);
|
||||||
p_module = PyImport_Import(p_name);
|
p_module = PyImport_Import(p_name);
|
||||||
Py_DECREF(p_name);
|
Py_DECREF(p_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user