Skip to content

Commit cb2ddb0

Browse files
committed
Issue rpcope1#9 - Some delete bodies are empty, and json deserialization fails.
If the response body is empty, instead of trying to json-decode, just return None. This should fix issue rpcope1#9.
1 parent 3d34d08 commit cb2ddb0

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎PythonConfluenceAPI/api.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ def _service_request(self, request_type, sub_uri, params=None, callback=None,
111111
response.raise_for_status()
112112
if callback:
113113
return callback(response)
114+
elif not response.text and not raw:
115+
return None
114116
else:
115117
return response.content if raw else json.loads(response.text)
116118

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__author__ = 'Robert Cope', 'Pushrod Technology'
22
__author_email__ = 'robert.cope@pushrodtechnology.com'
3-
__version__ = '0.0.1rc3'
3+
__version__ = '0.0.1rc4'
44

55
import ez_setup
66
ez_setup.use_setuptools()

0 commit comments

Comments
 (0)