Skip to content

Commit e40ab75

Browse files
author
Myles Metzler
committed
WatlowF4T.prgm_delete now fails when appropriate
1 parent 1fbe959 commit e40ab75

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

chamberconnectlibrary/watlowf4t.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -852,10 +852,8 @@ def prgm_delete(self, N):
852852
self.client.write_holding(18888, N) #set active profile
853853
self.client.write_holding(18890, self.inv_watlow_val_dict('delete')) #delete profile
854854
except ModbusError, exp:
855-
if 'Exception code = 4' in exp.message:
856-
pass # the program does not exist consume the exception
857-
else:
858-
raise # something else went wrong pass the exception on up.
855+
exp.message = 'Cannot delete program. (original message: %s)' % exp.message
856+
raise # something else went wrong pass the exception on up.
859857

860858
@exclusive
861859
def sample(self, lookup=None):

0 commit comments

Comments
 (0)