Fix setting identicon width and height

pull/46/head
Mark Haines 2015-02-02 16:32:33 +00:00
parent 038f5afb07
commit f2eda123b7
1 changed files with 2 additions and 2 deletions

View File

@ -41,8 +41,8 @@ class IdenticonResource(Resource):
def render_GET(self, request):
name = "/".join(request.postpath)
width = int(request.args.get("width", 96))
height = int(request.args.get("height", 96))
width = int(request.args.get("width", [96])[0])
height = int(request.args.get("height", [96])[0])
identicon_bytes = self.generate_identicon(name, width, height)
request.setHeader(b"Content-Type", b"image/png")
return identicon_bytes