Skip to content

Commit

Permalink
Merge branch 'lupien-fix-eventtyt push origin masterpe-bug'
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Aug 6, 2015
2 parents fcce1f4 + 35f578a commit a199807
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyvisa/resources/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@

class WaitResponse(object):
"""Class used in return of wait_on_event. It properly closes the context upon delete.
A call with event_type of 0 (normally used when timed_out is True) will be
recorded as None, otherwise it records the proper EventType enum.
"""
def __init__(self, event_type, context, ret, visalib, timed_out=False):
self.event_type = constants.EventType(event_type)
if event_type == 0:
self.event_type = None
else:
self.event_type = constants.EventType(event_type)
self.context = context
self.ret = ret
self._visalib = visalib
Expand Down

0 comments on commit a199807

Please sign in to comment.