Make Accept headers py 2.6 compatible

master
pictuga 2013-12-01 15:47:20 +01:00
parent 66c6dcf203
commit 8b3062eaa2
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ class SimpleDownload(urllib2.HTTPCookieProcessor):
if not self.strict: if not self.strict:
out['*/*'] = rank-0.1 out['*/*'] = rank-0.1
string = ','.join([x+';q={:.1}'.format(out[x]) if out[x] != 1 else x for x in out]) string = ','.join([x+';q={0:.1}'.format(out[x]) if out[x] != 1 else x for x in out])
log(string) log(string)
req.add_unredirected_header('Accept', string) req.add_unredirected_header('Accept', string)