From 5735261ab6646d4d54d96de61fdd4ed2662f65b5 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 5 Sep 2018 15:56:48 -0400 Subject: [PATCH] Backport PR #12023: Fix deprecation check in wx Timer. --- lib/matplotlib/backends/backend_wx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/backend_wx.py b/lib/matplotlib/backends/backend_wx.py index 514038633637..6f836db94a1f 100644 --- a/lib/matplotlib/backends/backend_wx.py +++ b/lib/matplotlib/backends/backend_wx.py @@ -121,7 +121,7 @@ class TimerWx(TimerBase): ''' def __init__(self, *args, **kwargs): - if isinstance(args[0], wx.EvtHandler): + if args and isinstance(args[0], wx.EvtHandler): cbook.warn_deprecated( "3.0", "Passing a wx.EvtHandler as first argument to the " "TimerWx constructor is deprecated since %(version)s.")