From 86f91f9fb04b9ecc122b08fcf443fe4ff01185f6 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Fri, 12 Jan 2007 00:07:37 +0000 Subject: [PATCH] - fail with non-zero exit code on e.g. 404 errors --- curlwrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curlwrapper.py b/curlwrapper.py index 97a35a3..462c6ed 100644 --- a/curlwrapper.py +++ b/curlwrapper.py @@ -4,7 +4,7 @@ from subprocess import PIPE, Popen class CurlException(Exception): pass def retrieve(url, cacert=None, postdata=None, timeout=300): - options = ('/usr/bin/curl',) + options = ('/usr/bin/curl', '--fail', '--silent') if cacert: options += ('--cacert', cacert) if postdata: options += ('--data', '@-') if timeout: options += ('--max-time', str(timeout)) -- 2.47.0