changeset 21:183224756ded

reverse order the log for display
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 01 Aug 2011 23:53:33 -0700
parents f1142bcce77a
children a60cf57d6628
files setup.py uploader/handlers.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py
+++ b/setup.py
@@ -1,12 +1,12 @@
 from setuptools import setup, find_packages
 import sys, os
 
-version = "0.2.6"
+version = "0.2.7"
 
 setup(name='UploadView',
       version=version,
       description="a file uploader app",
       long_description="",
       classifiers=[], # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
       author='Ethan Jucovy',
       author_email='',
--- a/uploader/handlers.py
+++ b/uploader/handlers.py
@@ -43,17 +43,17 @@ class Get(Handler):
             contents = os.listdir(self.app.directory)
             if contents:
                 contents.sort()
                 form += '<div><i>Currently uploaded:<ul><li>' + '</li><li>'.join(contents) + '</li></ul></i></div>'
             else:
                 form += '<div><i>No files in upload directory</i></div>'
             log_file = self.app.log_file
             if log_file and os.path.exists(log_file):
-                log_contents = file(log_file).read()
+                log_contents = ''.join(reversed(file(log_file).readlines()))
                 form += '<div>Upload log:<pre>%s</pre></div>' % log_contents
         form += '</body></html>'
         return Response(content_type='text/html', body=form)
 
 class Post(Handler):
 
     @classmethod
     def match(cls, app, request):