diff --git a/zerver/lib/upload.py b/zerver/lib/upload.py index 20b25b8451..3eeddcc0b6 100644 --- a/zerver/lib/upload.py +++ b/zerver/lib/upload.py @@ -90,7 +90,7 @@ def resize_avatar(image_data, size=DEFAULT_AVATAR_SIZE): im = Image.open(io.BytesIO(image_data)) im = ImageOps.fit(im, (size, size), Image.ANTIALIAS) except IOError: - raise BadImageError("Could not decode avatar image; did you upload an image file?") + raise BadImageError("Could not decode image; did you upload an image file?") out = io.BytesIO() im.save(out, format='png') return out.getvalue() diff --git a/zerver/tests/test_upload.py b/zerver/tests/test_upload.py index a19a20f5c5..638624c890 100644 --- a/zerver/tests/test_upload.py +++ b/zerver/tests/test_upload.py @@ -444,7 +444,7 @@ class AvatarTest(UploadSerializeMixin, ZulipTestCase): with get_test_image_file(fname) as fp: result = self.client_put_multipart("/json/users/me/avatar", {'file': fp}) - self.assert_json_error(result, "Could not decode avatar image; did you upload an image file?") + self.assert_json_error(result, "Could not decode image; did you upload an image file?") user_profile = get_user_profile_by_email("hamlet@zulip.com") self.assertEqual(user_profile.avatar_version, 1)