diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-09-14 14:09:13 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-09-14 14:13:53 +0200 |
commit | 54e001e9be5be5f1d711a2686f7d6808987f44c0 (patch) | |
tree | 6bbad1d3f8dfe807478b030e53dc811e0071f2ca /rscalib | |
parent | ca3bc5e49f2965ed365aa17cf8c8adb55fdaa828 (diff) | |
download | remote-logon-config-agent-54e001e9be5be5f1d711a2686f7d6808987f44c0.tar.gz remote-logon-config-agent-54e001e9be5be5f1d711a2686f7d6808987f44c0.tar.bz2 remote-logon-config-agent-54e001e9be5be5f1d711a2686f7d6808987f44c0.zip |
rscalib/__init__.py: Don't set fp to None when raising an HTTPError, use io.StringIO() object instead.
Diffstat (limited to 'rscalib')
-rw-r--r-- | rscalib/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rscalib/__init__.py b/rscalib/__init__.py index 9c61844..92ac16c 100644 --- a/rscalib/__init__.py +++ b/rscalib/__init__.py @@ -14,7 +14,6 @@ import base64 import pycurl - class UserError(Exception): """An error message that should be presented to the user.""" @@ -131,8 +130,12 @@ class PycURLGetter: header_ = ''.join(lines[1:]) headers = parse_headers(BytesIO(header_.encode('ascii'))) raise urllib.error.HTTPError( - self.curl.getinfo(pycurl.EFFECTIVE_URL), status, - self.result.getvalue(), headers, None) + self.curl.getinfo(pycurl.EFFECTIVE_URL), + code=status, + msg=self.result.getvalue(), + hdrs=headers, + fp=StringIO() + ) class GetMazaData: |