/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/pci.c

  • Committer: Suren A. Chilingaryan
  • Date: 2016-03-02 23:50:59 UTC
  • Revision ID: csa@suren.me-20160302235059-i036bhgezo2ikrsy
Make Python problems non-fatal

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
        
148
148
        err = pcilib_init_py(ctx);
149
149
        if (err) {
150
 
            pcilib_error("Error (%i) initializing python subsystem", err);
151
 
            pcilib_close(ctx);
152
 
            return NULL;
 
150
            pcilib_warning("Error (%i) initializing python subsystem", err);
 
151
            pcilib_free_py(ctx);
153
152
        }
154
153
 
155
154
        ctx->alloc_reg = PCILIB_DEFAULT_REGISTER_SPACE;
191
190
 
192
191
        if (!ctx->model)
193
192
            ctx->model = strdup(model?model:"pci");
194
 
            
 
193
 
195
194
        err = pcilib_py_add_script_dir(ctx, NULL);
196
195
        if (err) {
197
 
            pcilib_error("Error (%i) add script path to python path", err);
198
 
            pcilib_close(ctx);
199
 
            return NULL;
 
196
            pcilib_warning("Error (%i) add script path to python path", err);
 
197
            pcilib_free_py(ctx);
 
198
            err = 0;
200
199
        }
201
 
        
202
 
        
 
200
 
 
201
 
203
202
        xmlerr = pcilib_init_xml(ctx, ctx->model);
204
203
        if ((xmlerr)&&(xmlerr != PCILIB_ERROR_NOTFOUND)) {
205
204
            pcilib_error("Error (%i) initializing XML subsystem for model %s", xmlerr, ctx->model);
206
205
            pcilib_close(ctx);
207
206
            return NULL;
208
207
        }
209
 
        
 
208
 
210
209
 
211
210
            // We have found neither standard model nor XML
212
211
        if ((err)&&(xmlerr)) {