From f9f42bbd1f45d6fe3b1af4eb034666277740ddfb Mon Sep 17 00:00:00 2001 From: Colin Davis 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)])