From 1c80fc8ca6816b81f073891cccba165088e57dd1 Mon Sep 17 00:00:00 2001 From: Robohash <401330+e1ven@users.noreply.github.com> Date: Mon, 18 Jul 2011 21:47:54 +0000 Subject: [PATCH] fix bug --- webfront.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webfront.py b/webfront.py index 6142313..b1c3756 100755 --- a/webfront.py +++ b/webfront.py @@ -274,9 +274,6 @@ class ImgHandler(tornado.web.RequestHandler): replaceset.append(s) client_set = replaceset[r.hasharray[1] % len(replaceset) ] - - - if client_set == 'set1': client_set = colors[r.hasharray[0] % len(colors) ] @@ -289,7 +286,7 @@ class ImgHandler(tornado.web.RequestHandler): client_bgset = tornado.escape.xhtml_escape(self.get_argument("bgset")) else: client_bgset = bgsets[r.hasharray[2] % len(bgsets) ] - + #If they don't specify a color, use hashvalue @@ -322,7 +319,7 @@ class ImgHandler(tornado.web.RequestHandler): if client_bgset is not "": bglist = [] - for ls in os.listdir(client_bgset).sort(): + for ls in os.listdir(client_bgset): if not ls.startswith("."): bglist.append(client_bgset + "/" + ls) bg = Image.open(bglist[r.hasharray[3] % len(bglist)])