From 7f556d8939ba0c274e602719368ce01b9fd9b01c Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 5 Mar 2013 11:39:50 +0900 Subject: [PATCH] should always download when force is set --- library/get_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/get_url b/library/get_url index 58d3835d37..167316139f 100644 --- a/library/get_url +++ b/library/get_url @@ -132,7 +132,7 @@ def url_do_get(module, url, dest): request = urllib2.Request(url) request.add_header('User-agent', USERAGENT) - if os.path.exists(dest): + if os.path.exists(dest) and not module.params['force']: t = datetime.datetime.utcfromtimestamp(os.path.getmtime(dest)) tstamp = t.strftime('%a, %d %b %Y %H:%M:%S +0000') request.add_header('If-Modified-Since', tstamp)