Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid complaints during startup, add Unsupported #16

Merged
merged 1 commit into from
Oct 24, 2015
Merged

Avoid complaints during startup, add Unsupported #16

merged 1 commit into from
Oct 24, 2015

Conversation

philpennock
Copy link
Contributor

If a program using this library doesn't have clipboard manipulation as
its main feature (just a useful extra), this library always complaining
to stderr during init, where it can't be stopped, makes those programs
verbose during startup on systems where there is no clipboard (eg,
headless servers).

Rather than complain to stdio in a library, move the complaint into an
error return to make it clearer what's going wrong.

In addition, export a package variable Unsupported which client
programs might use to inhibit use of the clipboard functions, for
smoother integration.

If a program using this library doesn't have clipboard manipulation as
its main feature (just a useful extra), this library always complaining
to stderr during init, where it can't be stopped, makes those programs
verbose during startup on systems where there is no clipboard (eg,
headless servers).

Rather than complain to stdio in a library, move the complaint into an
error return to make it clearer what's going wrong.

In addition, export a package variable `Unsupported` which client
programs might use to inhibit use of the clipboard functions, for
smoother integration.
@atotto
Copy link
Owner

atotto commented Oct 24, 2015

Thank you for your pull request!

LGTM

atotto added a commit that referenced this pull request Oct 24, 2015
Avoid complaints during startup, add Unsupported
@atotto atotto merged commit d35a4e4 into atotto:master Oct 24, 2015
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.

2 participants