pep8 much?

This commit is contained in:
neersighted 2012-02-29 00:29:53 -08:00
parent e77e45d8b8
commit ed50bc746c
33 changed files with 92 additions and 99 deletions

View file

@ -13,14 +13,16 @@ def gitio(inp):
except:
code = None
# if the first 8 chars of "url" are not "https://" then append "https://" to the url
# if the first 8 chars of "url" are not "https://" then append "https://" to the url, also convert "http://" to "https://"
if url[:8] != "https://":
url = "https://" + url
if url[:7] != "http://":
url = "https://" + url
else:
url = "https://" + url[7:]
url='url='+str(url)
if code:
url = url + '&code=' + str(code)
req = urllib2.Request(url='http://git.io', data = url)
req = urllib2.Request(url='http://git.io', data=url)
# try getting url, catch http error
try:
@ -43,4 +45,4 @@ def gitio(inp):
# this wont work for some reason, so lets ignore it ^
# return location, minus the first 10 chars
return location[10:]
return location[10:]