Author: luks
Date: 2006-10-09 11:46:36 +0000 (Mon, 09 Oct 2006)
New Revision: 8518
Modified:
python-musicbrainz2/branches/picard/src/musicbrainz2/webservice.py
Log:
Return the stream also from WebService.post
Modified: python-musicbrainz2/branches/picard/src/musicbrainz2/webservice.py
===================================================================
--- python-musicbrainz2/branches/picard/src/musicbrainz2/webservice.py
2006-10-09 11:43:17 UTC (rev 8517)
+++ python-musicbrainz2/branches/picard/src/musicbrainz2/webservice.py
2006-10-09 11:46:36 UTC (rev 8518)
@@ -77,6 +77,8 @@
@param data: A string containing the data to post
@param version: a string containing the web service version to
use
+ @return: a file-like object
+
@raise WebServiceError: in case of errors
"""
raise NotImplementedError()
@@ -285,7 +287,7 @@
self._log.debug('POST ' + url)
self._log.debug('POST-BODY: ' + data)
- self._opener.open(req, data)
+ return self._opener.open(req, data)
except urllib2.HTTPError, e:
self._log.debug("POST failed: " + str(e))
if e.code == 400: # in python 2.4: httplib.BAD_REQUEST
|