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

don't try to use token if it is falsy #234

Merged
merged 4 commits into from
Nov 17, 2022
Merged

don't try to use token if it is falsy #234

merged 4 commits into from
Nov 17, 2022

Conversation

timmysilv
Copy link
Contributor

@timmysilv timmysilv commented Nov 11, 2022

Today it checks specifically if token is None. It might as well check that it's not "" either.

Context: if you have the IBMQX_TOKEN environment variable set to the empty string (rather than just not set), it tries to connect and you get an ugly HTTP error instead of the expected "no token provided" error. This fixes that. This was caught on PennyLane Cloud, where that would happen by default.

Today it checks specifically if `token` is `None`. It might as well check that it's not `""` either.
@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Merging #234 (1c818d5) into master (0e336b6) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #234   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          291       291           
=========================================
  Hits           291       291           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@timmysilv timmysilv marked this pull request as ready for review November 16, 2022 18:00
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog?

Nice to see that the problem has such a simple fix 👍

@timmysilv timmysilv merged commit b3abb3d into master Nov 17, 2022
@timmysilv timmysilv deleted the check-token-falsy branch November 17, 2022 14:34
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