Added error checking for empty parameters

This commit is contained in:
Steve Vaught
2011-04-19 00:50:58 -04:00
parent 6c00d59973
commit 482161e98b
5 changed files with 12 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ import web
def val(phenny, input):
"""Check a webpage using the W3C Markup Validator."""
if not input.group(2):
return phenny.reply("Nothing to validate.")
uri = input.group(2)
if not uri.startswith('http://'):
uri = 'http://' + uri