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

fix nzbget test #1899

Merged
merged 1 commit into from Jan 4, 2017
Merged

fix nzbget test #1899

merged 1 commit into from Jan 4, 2017

Conversation

OmgImAlexis
Copy link
Collaborator

This fixes nzbget using https at all times in the test.

We need the True/False section as current values are stored as on/off so next time the user runs this it'll fix it all up.

if use_https == 'false':
use_https = False
else:
use_https = True
Copy link
Contributor

Choose a reason for hiding this comment

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

use_https = bool(use_https) didn't work?

if use_https == 'false':
use_https = False
else:
use_https = True
connected_status = nzbget.testNZB(host, username, password, use_https)
Copy link
Contributor

Choose a reason for hiding this comment

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

or put it here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The current values are 'on' 'off', they're now 'true' 'false'. Python sees all 4 values as truthy values and sets it as true. 😞

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@p0psicles p0psicles Jan 4, 2017

Choose a reason for hiding this comment

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

So you could do:
connected_status = nzbget.testNZB(host, username, password, config.checkbox_to_value(use_https))

checkbox_to_value works on: 'on', 'off', 'true', 'false'. It doesn't work on True, False

@p0psicles p0psicles merged commit 028ba30 into develop Jan 4, 2017
@p0psicles p0psicles deleted the fix-nzbget branch January 4, 2017 16:30
@p0psicles p0psicles added this to the 0.1.10 milestone Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants