diff --git a/src/frogtips/frogsay.py b/src/frogtips/frogsay.py index 0e61d8f..ca42994 100644 --- a/src/frogtips/frogsay.py +++ b/src/frogtips/frogsay.py @@ -1,6 +1,6 @@ from frogtips import constants import random -import os +import shutil def say(text_to_say, tip_id=0): @@ -23,10 +23,7 @@ def say(text_to_say, tip_id=0): frog_image_width = get_max_width(frog_image.split("\n")) # Determine the width of the terminal - try: - columns, rows = os.get_terminal_size(0) - except OSError: - columns, rows = os.get_terminal_size(1) + columns, rows = shutil.get_terminal_size() # Determine the maximum width of the output text. # The number 4 is determined by taking one character for each side of the