[csw-devel] SF.net SVN: gar:[14342] csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Wed Apr 20 16:52:59 CEST 2011
Revision: 14342
http://gar.svn.sourceforge.net/gar/?rev=14342&view=rev
Author: wahwah
Date: 2011-04-20 14:52:59 +0000 (Wed, 20 Apr 2011)
Log Message:
-----------
csw-upload-pkg: Throw an exception on 401
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
Modified: csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/csw_upload_pkg.py 2011-04-20 14:32:43 UTC (rev 14341)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg.py 2011-04-20 14:52:59 UTC (rev 14342)
@@ -377,7 +377,10 @@
http_code,
c.getinfo(pycurl.EFFECTIVE_URL))
c.close()
- successful = http_code >= 200 and http_code <= 299
+ logging.debug("HTTP code: %s", http_code)
+ if http_code == 401:
+ raise RestCommunicationError("Received HTTP code {0}".format(http_code))
+ successful = (http_code >= 200 and http_code <= 299)
metadata = None
if successful:
metadata = json.loads(d.getvalue())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list