Commit 8517d62b authored by Klaus-Uwe Mitterer's avatar Klaus-Uwe Mitterer

Prettier exception handling

parent f26e995f
......@@ -40,14 +40,14 @@ def urlparse(url):
if "/auswertung/pix/popup.php/" in url:
return "" % url[52:82]
raise ValueError("%s is not a valid URL.")
raise ValueError("%s is not a valid URL" % url)
def processURL(url, sender = False, geturls = False, verbose = False, shutup = False):
verboselog("Processing URL %s..." % url, verbose)
purl = urlparse(url)
except ValueError:
log("Notice: %s is not a valid URL. Skipping." % url, shutup)
except ValueError as e:
log("Notice: %s. Skipping." % e, shutup)
if purl == urlparse(url):
log("Warning: You may have copied the image URL rather than the link URL from the message window. Use the link URL instead!", shutup)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment