diff options
Diffstat (limited to 'pcilib/pci.c')
-rw-r--r-- | pcilib/pci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pcilib/pci.c b/pcilib/pci.c index 58ee4b0..2b7b97b 100644 --- a/pcilib/pci.c +++ b/pcilib/pci.c @@ -144,6 +144,13 @@ pcilib_t *pcilib_open(const char *device, const char *model) { pcilib_close(ctx); return NULL; } + + err = pcilib_init_py(ctx); + if (err) { + pcilib_error("Error (%i) initializing python subsystem", err); + pcilib_close(ctx); + return NULL; + } ctx->alloc_reg = PCILIB_DEFAULT_REGISTER_SPACE; ctx->alloc_views = PCILIB_DEFAULT_VIEW_SPACE; @@ -185,9 +192,9 @@ pcilib_t *pcilib_open(const char *device, const char *model) { if (!ctx->model) ctx->model = strdup(model?model:"pci"); - err = pcilib_init_py(ctx); + err = pcilib_py_add_script_dir(ctx); if (err) { - pcilib_error("Error (%i) initializing python subsystem", err); + pcilib_error("Error (%i) add script path to python path", err); pcilib_close(ctx); return NULL; } |