PEP8, various other tweaks
This commit is contained in:
parent
6c022dac1c
commit
e12e7721da
11 changed files with 29 additions and 34 deletions
|
@ -10,7 +10,7 @@ paste_url = "http://paste.dmptr.com"
|
|||
def isgd(url):
|
||||
""" shortens a URL with the is.gd PAI """
|
||||
url = urlnorm.normalize(url.encode('utf-8'))
|
||||
params = urllib.urlencode({'format': 'simple', 'url': url})
|
||||
params = urllib.urlencode({'format': 'simple', 'url': url})
|
||||
return http.get("http://is.gd/create.php?%s" % params)
|
||||
|
||||
|
||||
|
@ -19,4 +19,4 @@ def haste(text):
|
|||
request = urllib2.Request(paste_url + "/documents", text)
|
||||
response = urllib2.urlopen(request)
|
||||
data = json.loads(response.read())
|
||||
return("%s/%s.txt" % (paste_url, data['key']))
|
||||
return("%s/%s.txt" % (paste_url, data['key']))
|
||||
|
|
Reference in a new issue