mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Avoid redundant retry
Avoid attempting to recast to `int` when it had just failed.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user