We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 02d0c0c + 82c0822 commit 83af7f3Copy full SHA for 83af7f3
lib/matplotlib/testing/compare.py
@@ -136,9 +136,7 @@ def encode_and_escape(name):
136
self._proc.stdin.flush()
137
# GS> if nothing left on the stack; GS<n> if n items left on the stack.
138
err = self._read_until((b"GS<", b"GS>"))
139
- stack = ""
140
- if err.endswith(b"GS<"):
141
- stack = self._read_until(b">")
+ stack = self._read_until(b">") if err.endswith(b"GS<") else b""
142
if stack or not os.path.exists(dest):
143
stack_size = int(stack[:-1]) if stack else 0
144
self._proc.stdin.write(b"pop\n" * stack_size)
0 commit comments