/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 views/transform.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:
18
18
    pcilib_view_context_t *view_ctx;
19
19
    pcilib_transform_view_description_t *v = (pcilib_transform_view_description_t*)(ctx->views[view]);
20
20
 
21
 
    if(v->script) {     
 
21
    if (v->script) {
22
22
        pcilib_access_mode_t mode = 0;
23
23
                
24
24
        err = pcilib_py_load_script(ctx, v->script);
39
39
 
40
40
        if (!v->read_from_reg) v->read_from_reg = "read_from_register";
41
41
        if (!v->write_to_reg) v->write_to_reg = "write_to_register";
 
42
    } else if (!ctx->py) {
 
43
        v->base.mode &= (~PCILIB_REGISTER_RW);
42
44
    }
43
 
        
 
45
 
44
46
    view_ctx = (pcilib_view_context_t*)malloc(sizeof(pcilib_view_context_t));
45
47
    if (view_ctx) memset(view_ctx, 0, sizeof(pcilib_view_context_t));
46
 
    
 
48
 
47
49
    return view_ctx;
48
50
}
49
51