Avoid redundant retry

Avoid attempting to recast to `int` when it had just failed.
This commit is contained in:
Mesalu
2018-06-27 09:53:43 -07:00
committed by GitHub
parent 7b744beacd
commit b78e50c913

View File

@@ -859,7 +859,7 @@ class IntCtrl(wx.TextCtrl):
try:
return int( value )
except ValueError:
if self.IsLongAllowed():
if self.IsLongAllowed() and (LONGTYPE is not int):
return LONGTYPE( value )
else:
raise