mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-17 13:38:03 +00:00
Fix pylint warnings
This commit is contained in:
@@ -99,14 +99,14 @@ class AvatarImageView(TemplateView):
|
|||||||
if centry:
|
if centry:
|
||||||
# For DEBUG purpose only print('Cached entry for %s' % uri)
|
# For DEBUG purpose only print('Cached entry for %s' % uri)
|
||||||
return HttpResponse(
|
return HttpResponse(
|
||||||
centry['content'],
|
centry['content'],
|
||||||
content_type=centry['content_type'],
|
content_type=centry['content_type'],
|
||||||
status=centry['status'],
|
status=centry['status'],
|
||||||
reason = centry['reason'],
|
reason=centry['reason'],
|
||||||
charset = centry['charset'])
|
charset=centry['charset'])
|
||||||
|
|
||||||
# In case no digest at all is provided, return to home page
|
# In case no digest at all is provided, return to home page
|
||||||
if not 'digest' in kwargs:
|
if 'digest' not in kwargs:
|
||||||
return HttpResponseRedirect(reverse_lazy('home'))
|
return HttpResponseRedirect(reverse_lazy('home'))
|
||||||
|
|
||||||
if 'd' in request.GET:
|
if 'd' in request.GET:
|
||||||
@@ -248,7 +248,7 @@ class AvatarImageView(TemplateView):
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
if str(default) == 'mmng':
|
if str(default) == 'mmng':
|
||||||
mmngimg = mm_ng(hash=kwargs['digest'], size=size)
|
mmngimg = mm_ng(idhash=kwargs['digest'], size=size)
|
||||||
data = BytesIO()
|
data = BytesIO()
|
||||||
mmngimg.save(data, 'PNG', quality=JPEG_QUALITY)
|
mmngimg.save(data, 'PNG', quality=JPEG_QUALITY)
|
||||||
data.seek(0)
|
data.seek(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user