From 8a4899a788f7b0a8c102c685e30f7761e948218c Mon Sep 17 00:00:00 2001 From: Robohash <401330+e1ven@users.noreply.github.com> Date: Fri, 8 Jul 2011 16:49:12 -0400 Subject: [PATCH] sort --- webfront.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webfront.py b/webfront.py index f374ff8..7b0ce9a 100755 --- a/webfront.py +++ b/webfront.py @@ -297,7 +297,7 @@ class ImgHandler(tornado.web.RequestHandler): if client_bgset is not "": bglist = [] - for ls in os.listdir(client_bgset): + for ls in os.listdir(client_bgset).sort(): if not ls.startswith("."): bglist.append(client_bgset + "/" + ls) bg = Image.open(bglist[r.hasharray[3] % len(bglist)])