mirror of
https://github.com/e1ven/Robohash.git
synced 2025-06-23 21:35:02 +00:00
sort backgrounds
This commit is contained in:
parent
8cb8d7dde5
commit
72ed4f9edb
@ -361,7 +361,9 @@ class ImgHandler(tornado.web.RequestHandler):
|
|||||||
|
|
||||||
if client_bgset is not "":
|
if client_bgset is not "":
|
||||||
bglist = []
|
bglist = []
|
||||||
for ls in os.listdir(client_bgset):
|
backgrounds = os.listdir(client_bgset)
|
||||||
|
backgrounds.sort()
|
||||||
|
for ls in backgrounds:
|
||||||
if not ls.startswith("."):
|
if not ls.startswith("."):
|
||||||
bglist.append(client_bgset + "/" + ls)
|
bglist.append(client_bgset + "/" + ls)
|
||||||
bg = Image.open(bglist[r.hasharray[3] % len(bglist)])
|
bg = Image.open(bglist[r.hasharray[3] % len(bglist)])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user