mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/roman-mkh/calibre
This commit is contained in:
commit
018d673023
@ -112,7 +112,7 @@ def format_price_in_RUR(price):
|
|||||||
'''
|
'''
|
||||||
if price and re.match(r"^\d*?\.\d*?$", price):
|
if price and re.match(r"^\d*?\.\d*?$", price):
|
||||||
try:
|
try:
|
||||||
price = u'{:,.2F} руб.'.format(float(price))
|
price = u'{:,.2F} \u20BD'.format(float(price)) # \u20BD => руб.
|
||||||
price = price.replace(',', ' ').replace('.', ',', 1)
|
price = price.replace(',', ' ').replace('.', ',', 1)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@ -121,7 +121,7 @@ def format_price_in_RUR(price):
|
|||||||
|
|
||||||
def ungzipResponse(r,b):
|
def ungzipResponse(r,b):
|
||||||
headers = r.info()
|
headers = r.info()
|
||||||
if headers['Content-Encoding']=='gzip':
|
if headers.get('Content-Encoding', '')=='gzip':
|
||||||
import gzip
|
import gzip
|
||||||
gz = gzip.GzipFile(fileobj=r, mode='rb')
|
gz = gzip.GzipFile(fileobj=r, mode='rb')
|
||||||
data = gz.read()
|
data = gz.read()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user