Skip to content

change web.Response to return empty values instead of excepting

Dean Jackson requested to merge friedenberg:develop into develop

Created by: friedenberg

Hi!

I was using this awesome project for some of my own alfred workflows, and while debugging I noticed that when things like HTTP Basic Auth fail, the self.raw property on web.Response ends up as None. This causes things like self.content and self.text to raise an exception, which was very confusing to me.

I've changed this in my PR so that these methods return empty strings in those cases. I've also added a tiny bit to the README about running unit tests (it wasn't clear to me, because /.run-tests.sh failed because of yanc missing. Looks like using tox takes care of that, but let me know if that's wrong.

Thanks!

Merge request reports