Skip to content

Commit

Permalink
Merge branch 'lupien-fix_lock_excl'
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed May 19, 2015
2 parents b5a44aa + e4ab706 commit 8fc41ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyvisa/ctwrapper/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,10 @@ def lock(library, session, lock_type, timeout, requested_key=None):
else:
access_key = create_string_buffer(256)
ret = library.viLock(session, lock_type, timeout, requested_key, access_key)
return access_key.value, ret
if access_key is None:
return None, ret
else:
return access_key.value, ret


def map_address(library, session, map_space, map_base, map_size,
Expand Down

0 comments on commit 8fc41ff

Please sign in to comment.