Skip to content

Commit 721ad89

Browse files
committed
Force timer interval to int. This silences an exception for Tk and a warning from GTK when a float is given.
svn path=/trunk/matplotlib/; revision=8478
1 parent e01c3c6 commit 721ad89

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,9 @@ def _get_interval(self):
944944
return self._interval
945945

946946
def _set_interval(self, interval):
947+
# Force to int since none of the backends actually support fractional
948+
# milliseconds, and some error or give warnings.
949+
interval = int(interval)
947950
self._interval = interval
948951
self._timer_set_interval()
949952

0 commit comments

Comments
 (0)