summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-09-22 11:43:58 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2018-09-22 11:43:58 +0200
commited8b846bd976ccce70cc3118f9a35d35f990f01e (patch)
tree523fd96a103c927418479e1a417e253a1eb2fabc
parentfd941d349169b48637760c37d5079228afa6ec51 (diff)
New upstream version 0.3.1
-rw-r--r--CHANGES4
-rw-r--r--pyvisa-py/sessions.py11
-rw-r--r--setup.py2
3 files changed, 11 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index 58c4944..2052e11 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
PyVISA-py Changelog
===================
+0.3.1 (2018-09-12)
+------------------
+
+- Fix initialization of timeout (issue identified in TCPIP resources) PR #160
0.3 (2018-09-05)
----------------
diff --git a/pyvisa-py/sessions.py b/pyvisa-py/sessions.py
index 5674177..d634884 100644
--- a/pyvisa-py/sessions.py
+++ b/pyvisa-py/sessions.py
@@ -190,11 +190,6 @@ class Session(compat.with_metaclass(abc.ABCMeta)):
self.parsed = parsed
self.open_timeout = open_timeout
- #: Get default timeout from constants
- self.timeout =\
- (attributes.AttributesByID[constants.VI_ATTR_TMO_VALUE].default /
- 1000.0)
-
#: Used as a place holder for the object doing the lowlevel
#: communication.
self.interface = None
@@ -209,6 +204,12 @@ class Session(compat.with_metaclass(abc.ABCMeta)):
constants.VI_ATTR_INTF_TYPE: parsed.interface_type,
constants.VI_ATTR_TMO_VALUE: (self._get_timeout,
self._set_timeout)}
+
+ #: Set the default timeout from constants
+ attr = constants.VI_ATTR_TMO_VALUE
+ default_timeout = attributes.AttributesByID[attr].default
+ self.set_attribute(attr, default_timeout)
+
self.after_parsing()
def after_parsing(self):
diff --git a/setup.py b/setup.py
index a5a9e52..c4ef163 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ requirements = ['pyvisa>=1.8']
setup(name='PyVISA-py',
description='Python VISA bindings for GPIB, RS232, and USB instruments',
- version='0.3.0',
+ version='0.3.1',
long_description=long_description,
author='Hernan E. Grecco',
author_email='hernan.grecco@gmail.com',