aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de>2011-11-23 21:24:09 +0100
committerWolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de>2011-11-23 21:24:09 +0100
commit677449b520088413afd0ce9e443a68cb87fa3236 (patch)
tree91306d9d38dcd5703d98c65aca823a3d2f0a04b9
parent1f0362edfbcc12cd2477400b2726b2c6ea739175 (diff)
downloadPyPhytron-677449b520088413afd0ce9e443a68cb87fa3236.tar.gz
PyPhytron-677449b520088413afd0ce9e443a68cb87fa3236.tar.bz2
retry_count variable initialisation and increment _was_ missing.
-rw-r--r--Phytron.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Phytron.py b/Phytron.py
index 7ea0d28..1679f80 100644
--- a/Phytron.py
+++ b/Phytron.py
@@ -311,11 +311,13 @@ class IPCOMM:
self.conn.flushInput()
self.send( ('%X' % ID) + cmd )
+ retry_count = 0
while not recv_data and retry_count < self.max_retry_count:
try:
recv_data = self.recv()
except ReceiveChecksumError:
self.send( ('%X' % ID) + 'R')
+ retry_count += 1
if recv_data.status.rx_error:
extended_status = self.queryextendedstatus(ID).data