From 5132616c6c000dbc7ff336e1c01617c9d54f2124 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 5 Jan 2016 07:29:53 -0600 Subject: [PATCH] check_all --- gluon/contrib/appconfig.py | 1 - gluon/streamer.py | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gluon/contrib/appconfig.py b/gluon/contrib/appconfig.py index 972247f6..c9768183 100644 --- a/gluon/contrib/appconfig.py +++ b/gluon/contrib/appconfig.py @@ -35,7 +35,6 @@ from gluon.serializers import json_parser locker = thread.allocate_lock() - def AppConfig(*args, **vars): locker.acquire() diff --git a/gluon/streamer.py b/gluon/streamer.py index 3dbc386d..d6b49dc8 100644 --- a/gluon/streamer.py +++ b/gluon/streamer.py @@ -25,7 +25,6 @@ regex_stop_range = re.compile('(?<=\-)\d+') DEFAULT_CHUNK_SIZE = 64 * 1024 - def streamer(stream, chunk_size=DEFAULT_CHUNK_SIZE, bytes=None): offset = 0 while bytes is None or offset < bytes: @@ -51,11 +50,12 @@ def stream_file_or_304_or_206( status=200, error_message=None ): - if error_message is None: - error_message = rewrite.THREAD_LOCAL.routes.error_message % 'invalid request' + # FIX THIS + # if error_message is None: + # error_message = rewrite.THREAD_LOCAL.routes.error_message % 'invalid request' try: open = file # this makes no sense but without it GAE cannot open files - fp = open(static_file) + fp = open(static_file,'rb') except IOError, e: if e[0] == errno.EISDIR: raise HTTP(403, error_message, web2py_error='file is a directory')