Use already read file instead of rereading
This commit is contained in:
parent
ae8200d7be
commit
d59e2e2816
2
build.py
2
build.py
@ -85,7 +85,7 @@ def loaderGFM(var):
|
|||||||
return files[fn][filemd5]
|
return files[fn][filemd5]
|
||||||
else:
|
else:
|
||||||
url = 'https://api.github.com/markdown'
|
url = 'https://api.github.com/markdown'
|
||||||
payload = {'text': readfile(fn), 'mode': 'gfm', 'context': 'jonatkins/ingress-intel-total-conversion'}
|
payload = {'text': file, 'mode': 'gfm', 'context': 'jonatkins/ingress-intel-total-conversion'}
|
||||||
req = urllib2.Request(url)
|
req = urllib2.Request(url)
|
||||||
req.add_header('Content-Type', 'application/json')
|
req.add_header('Content-Type', 'application/json')
|
||||||
gfm = urllib2.urlopen(req, json.dumps(payload)).read().replace('\n', '').replace('\'', '\\\'')
|
gfm = urllib2.urlopen(req, json.dumps(payload)).read().replace('\n', '').replace('\'', '\\\'')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user