From b78e50c913f0ea03a651f0c578c3e0f72ec21d0a Mon Sep 17 00:00:00 2001 From: Mesalu Date: Wed, 27 Jun 2018 09:53:43 -0700 Subject: [PATCH] Avoid redundant retry Avoid attempting to recast to `int` when it had just failed. --- wx/lib/intctrl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wx/lib/intctrl.py b/wx/lib/intctrl.py index 7f79a844..21bdd805 100644 --- a/wx/lib/intctrl.py +++ b/wx/lib/intctrl.py @@ -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