fix: corrected exception
This commit is contained in:
parent
e4a46deb8b
commit
383483022d
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue