mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-19 22:48:01 +00:00
Pretty sure this io error cannot happen
This commit is contained in:
@@ -237,12 +237,7 @@ class UploadPhotoView(SuccessMessageMixin, FormView):
|
|||||||
messages.error(self.request, _('Image too big'))
|
messages.error(self.request, _('Image too big'))
|
||||||
return HttpResponseRedirect(reverse_lazy('profile'))
|
return HttpResponseRedirect(reverse_lazy('profile'))
|
||||||
|
|
||||||
try:
|
photo = form.save(self.request, photo_data)
|
||||||
photo = form.save(self.request, photo_data)
|
|
||||||
except IOError as e:
|
|
||||||
print('Error in IO: %s' % e)
|
|
||||||
messages.error(self.request, _('IO error'))
|
|
||||||
return HttpResponseRedirect(reverse_lazy('profile'))
|
|
||||||
|
|
||||||
if not photo:
|
if not photo:
|
||||||
messages.error(self.request, _('Invalid Format'))
|
messages.error(self.request, _('Invalid Format'))
|
||||||
|
|||||||
Reference in New Issue
Block a user