Port to python3, fix ssl support

This commit is contained in:
mutantmonkey
2011-09-22 14:17:27 -04:00
parent 8d601d52bd
commit 50fe275870
41 changed files with 628 additions and 622 deletions

View File

@@ -25,10 +25,10 @@ def val(phenny, input):
if isinstance(info, list):
return phenny.say('Got HTTP response %s' % info[1])
if info.has_key('X-W3C-Validator-Status'):
if 'X-W3C-Validator-Status' in info:
result += str(info['X-W3C-Validator-Status'])
if info['X-W3C-Validator-Status'] != 'Valid':
if info.has_key('X-W3C-Validator-Errors'):
if 'X-W3C-Validator-Errors' in info:
n = int(info['X-W3C-Validator-Errors'].split(' ')[0])
if n != 1:
result += ' (%s errors)' % n
@@ -40,4 +40,4 @@ val.rule = (['val'], r'(?i)(\S+)')
val.example = '.val http://www.w3.org/'
if __name__ == '__main__':
print __doc__.strip()
print(__doc__.strip())