From 76beffa2c7703d44ef030636e72ff33970433fcc Mon Sep 17 00:00:00 2001
From: Robohash <401330+e1ven@users.noreply.github.com>
Date: Fri, 8 Jul 2011 02:29:54 -0400
Subject: [PATCH] fixes
---
templates/root.html | 2 +-
webfront.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/templates/root.html b/templates/root.html
index d016597..75ea3e0 100644
--- a/templates/root.html
+++ b/templates/root.html
@@ -201,7 +201,7 @@ $(document).ready(function(){
-{% set drquotes = ['"Eliminates sources of Human Error."
Dr. Chandra, RobotCrunch',' "Klaatu barada nikto!"
Gort\'s Web Emporium','"A huge success!."
Cave Johnson, CEO, Aperture Laboratories','"Robohash put me out of a job. Screw them."
Thomas Light','"The Ultimate Worker."
Joh Fredersen, Founder Metropolis','"They almost look alive."
N. Crosby, Nova Robotics ','"It looks highly Profitable, I\'m Sure."
Dr. R. Venture, Super Scientist','"To make any alteration would prove fatal."
Dr. Eldon Tyrell', '"The robots are all so.. Normal!"
Joanna Eberhart, Beta tester','"They have beautiful dreams; May they never reach them.."
Dr. N. Soong'] %}
+{% set drquotes = ['"Eliminates sources of Human Error."
Dr. Chandra, RobotCrunch',' "Klaatu barada nikto!"
Gort\'s Web Emporium','"A huge success!."
Cave Johnson, CEO, Aperture Laboratories','" Superior technology and overwhelming brilliance."
Dr. Thomas Light, RIT','"The Ultimate Worker."
Joh Fredersen, Founder Metropolis','"They almost look alive."
N. Crosby, Nova Robotics ','"It looks highly Profitable, I\'m Sure."
Dr. R. Venture, Super Scientist','"To make any alteration would prove fatal."
Dr. Eldon Tyrell', '"The robots are all so.. Normal!"
Joanna Eberhart, Beta tester','"They have beautiful dreams; May they never reach them.."
Dr. N. Soong'] %}
diff --git a/webfront.py b/webfront.py
index 9f1aa9b..7b2d23d 100755
--- a/webfront.py
+++ b/webfront.py
@@ -148,11 +148,12 @@ class ImgHandler(tornado.web.RequestHandler):
#Change to a usuable format
- if string.endswith(('.png','.gif','.jpg','.bmp','.im','.jpeg','.pcx','.ppm','.tiff','.xbm')):
+ if string.endswith(('.png','.gif','.jpg','.bmp','.im','.jpeg','.pcx','.ppm','.tiff','.xbm','tif')):
ext = string[string.rfind('.') +1 :len(string)]
if ext.lower() == 'jpg':
- print "-------"
ext = 'jpeg'
+ if ext.lower() == 'tif':
+ ext = 'tiff'
else:
ext = "png"
self.set_header("Content-Type", "image/" + ext)