Skip to content

Commit d71342a

Browse files
authored
Use shutil.get_terminal_size
The low-level os function fails with an unhandled OSError on GitHub Actions.
1 parent 36d9b79 commit d71342a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytest_icdiff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# pylint: disable=inconsistent-return-statements
2-
import os
2+
import shutil
33
from pprintpp import pformat
44
import icdiff
55

6-
COLS = os.get_terminal_size().columns
6+
COLS = shutil.get_terminal_size().columns
77
MARGIN_L = 10
88
GUTTER = 2
99
MARGINS = MARGIN_L + GUTTER + 1

0 commit comments

Comments
 (0)