Skip to content
This repository was archived by the owner on Apr 12, 2023. It is now read-only.

Conversation

@matslindh
Copy link
Contributor

This is a collection of patches that by themselves are too small to warrant separate pull requests. In general they clean up things that work (and a few that didn't) for better style, clearer intent and future proofing. Each patch has comments related to what (and why) it fixes.

We need to explicitly cast these exceptions to a str before using them - as
we're concatenating the messages.

The ValueError is thrown by the JSON parsing, so the response line should
be moved outside of the try/catch statement, so that we can be sure that
the `response` value is actually defined for the catch statement.
There is no need to assign these client tests to the object itself, as the
result is tested within the method. The assignment _could_ have side
effects somewhere later (if the teardown for some reason isn't ran as
assumed).

To avoid any potential side effects we keep the assignments local to the
method.
@matslindh matslindh merged commit 2c945a0 into imbo:master Jan 6, 2017
@matslindh matslindh deleted the small-misc-cleanups branch January 6, 2017 15:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant