summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/downloadprovider.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/python/downloadprovider.py b/python/downloadprovider.py
index 112c4783..4a391202 100644
--- a/python/downloadprovider.py
+++ b/python/downloadprovider.py
@@ -82,8 +82,7 @@ class DownloadInstance(object):
def _write_callback(self, data, len, ctxt):
try:
- str_ptr = ctypes.cast(data, ctypes.c_char_p)
- str_bytes = str_ptr.value
+ str_bytes = ctypes.string_at(data, len)
self._response = self._response + str_bytes
return len
except: