From ad635c7081f8d01e4cd8f4e580307303c313931e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 22 Jan 2014 04:05:23 +0000 Subject: [PATCH] we're not always supposed to gzip test_file in web_server.py (unit test) --- test/web_server.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/web_server.py b/test/web_server.py index 02590423b..26316e88d 100644 --- a/test/web_server.py +++ b/test/web_server.py @@ -7,11 +7,14 @@ import gzip chunked_encoding = False -fin = open('test_file', 'rb') -f = gzip.open('test_file.gz', 'wb') -f.writelines(fin) -f.close() -fin.close() +try: + fin = open('test_file', 'rb') + f = gzip.open('test_file.gz', 'wb') + f.writelines(fin) + f.close() + fin.close() +except: + pass class http_server_with_timeout(BaseHTTPServer.HTTPServer): allow_reuse_address = True