Skip to content

Commit 457af93

Browse files
committed
gmoccapy: Fixed Inappropriate Logical Expression (#2769)
1 parent 669a1d6 commit 457af93

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/emc/usr_intf/gmoccapy/gmoccapy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5505,8 +5505,9 @@ def _button_pin_changed(self, pin):
55055505
LOG.debug("Received a not classified signal from pin {0}".format(pin.name))
55065506
return
55075507

5508-
number = int(pin.name[-1])
5509-
if number is not number:
5508+
try:
5509+
number = int(pin.name[-1])
5510+
except:
55105511
LOG.debug("Could not translate {0} to number".format(pin.name))
55115512
return
55125513

0 commit comments

Comments
 (0)