From 1f0bd33d8243c0b9ac06d48046c385de4cb933fc Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Thu, 15 Feb 2018 13:54:43 -0500 Subject: [PATCH] Backport PR #10454: Set packet_ends = None before using in dviread.py --- lib/matplotlib/dviread.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/dviread.py b/lib/matplotlib/dviread.py index b12abf4148cd..b38af56e67ec 100644 --- a/lib/matplotlib/dviread.py +++ b/lib/matplotlib/dviread.py @@ -640,7 +640,8 @@ def _read(self): Read one page from the file. Return True if successful, False if there were no more pages. """ - packet_len, packet_char, packet_width = None, None, None + packet_char, packet_ends = None, None + packet_len, packet_width = None, None while True: byte = ord(self.file.read(1)[0]) # If we are in a packet, execute the dvi instructions