fix: corrected exception

This commit is contained in:
shariquerik 2021-08-02 19:26:48 +05:30
parent e4a46deb8b
commit 383483022d

View file

@ -705,8 +705,8 @@ def get_web_image(file_url):
try:
image = Image.open(StringIO(frappe.safe_decode(r.content)))
except ValueError:
frappe.throw(_("Image link '{0}' is not valid").format(file_url), IOError)
except Exception as e:
frappe.msgprint(_("Image link '{0}' is not valid").format(file_url), raise_exception=e)
try:
filename, extn = file_url.rsplit("/", 1)[1].rsplit(".", 1)