Skip to content

Commit 6b00341

Browse files
committed
Update the method that returns the console width
1 parent a78d440 commit 6b00341

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

seleniumbase/fixtures/shared_utils.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,11 @@ def get_terminal_width():
4141
width = os.get_terminal_size().columns
4242
except Exception:
4343
try:
44-
if is_windows():
45-
raise Exception("Don't even try 'tput cols' on Windows!")
46-
width = int(subprocess.check_output(["tput", "cols"]))
47-
except Exception:
48-
try:
49-
import shutil
44+
import shutil
5045

51-
width = shutil.get_terminal_size((80, 20)).columns
52-
except Exception:
53-
pass
46+
width = shutil.get_terminal_size((80, 20)).columns
47+
except Exception:
48+
pass
5449
return width
5550

5651

0 commit comments

Comments
 (0)