Skip to content

Use the higher-level shutil rather than os for terminal dimensions - #1

Open
duress-to-kill wants to merge 1 commit into
FROG-TIPS:masterfrom
duress-to-kill:fix-noninteractive-frogsay
Open

Use the higher-level shutil rather than os for terminal dimensions#1
duress-to-kill wants to merge 1 commit into
FROG-TIPS:masterfrom
duress-to-kill:fix-noninteractive-frogsay

Conversation

@duress-to-kill

Copy link
Copy Markdown

This change follows the recommended pattern in the official python documentation (https://docs.python.org/3/library/os.html#os.get_terminal_size)

It also fixes an issue where calling frogsay.say() in a context without an associated terminal would repeatedly raise OSError and cause the code to abort. This issue makes the frogsay feature unusable in non-interactive contexts (such as, for example, calling frogsay -fr from a demo script used in a CI/CD pipeline to demonstrate platform functionality).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant