Skip to content

Commit

Permalink
Tweak to Pump.verify() for bug with PHD2000
Browse files Browse the repository at this point in the history
PHD2000 doesn't return address with leading zeros
  • Loading branch information
Tom Phillips committed Oct 26, 2014
1 parent 976e8eb commit ad7262c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pumpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self, chain, address=0, name='Pump 11'):
self.write('VER')
resp = self.read(17)

if resp[-3:-1] != self.address:
if int(resp[-3:-1]) != int(self.address):
raise PumpError('No response from pump at address %s' %
self.address)
except PumpError:
Expand Down

0 comments on commit ad7262c

Please sign in to comment.