This commit is contained in:
Colin Davis 2019-04-09 17:37:06 -04:00
parent b0b49207bd
commit 4eb33e4d02
2 changed files with 8 additions and 2 deletions

View File

@ -73,6 +73,12 @@ class Robohash(object):
currentend = (1 +i) * blocksize currentend = (1 +i) * blocksize
self.hasharray.append(int(self.hexdigest[currentstart:currentend],16)) self.hasharray.append(int(self.hexdigest[currentstart:currentend],16))
# Workaround for adding more sets in 2019.
# We run out of blocks, because we use some for each set, whether it's called or not.
# I can't easily change this without invalidating every hash so far :/
# This shouldn't reduce the security since it should only draw from one set of these in practice.
self.hasharray = self.hasharray + self.hasharray
def _listdirs(self,path): def _listdirs(self,path):
return [d for d in natsort.natsorted(os.listdir(path)) if os.path.isdir(os.path.join(path, d))] return [d for d in natsort.natsorted(os.listdir(path)) if os.path.isdir(os.path.join(path, d))]

View File

@ -217,8 +217,8 @@ class MainHandler(tornado.web.RequestHandler):
("Longcat is.. Descriptively named."), ("Longcat is.. Descriptively named."),
("It is fun to have fun, but you have to know meow."), ("It is fun to have fun, but you have to know meow."),
("Who knows the term man-cub but not baby?")] ("Who knows the term man-cub but not baby?")]
avatarquotes = [("Believe me, I'm a doctor"), avatarquotes = [("Believe me, I'm a doctor"),
("Pretty and you know it."), ("Pretty and you know it."),
("Nothing works unless I do it"), ("Nothing works unless I do it"),
("I'm a voice not an echo"), ("I'm a voice not an echo"),