mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-27 10:36:58 +01:00
python3: make recent_uas build
This commit is contained in:
parent
a7bbf0f51e
commit
13d236f556
2 changed files with 4 additions and 2 deletions
|
|
@ -10,11 +10,13 @@
|
|||
|
||||
from setup import download_securely
|
||||
|
||||
from polyglot.builtins import filter
|
||||
|
||||
is_ci = os.environ.get('CI', '').lower() == 'true'
|
||||
|
||||
|
||||
def filter_ans(ans):
|
||||
return filter(None, (x.strip() for x in ans))
|
||||
return list(filter(None, (x.strip() for x in ans)))
|
||||
|
||||
|
||||
def common_user_agents():
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ def run(self, opts):
|
|||
from setup.browser_data import get_data
|
||||
data = get_data()
|
||||
with open(self.UA_PATH, 'wb') as f:
|
||||
f.write(json.dumps(data, indent=2))
|
||||
f.write(json.dumps(data, indent=2).encode('utf-8'))
|
||||
# }}}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue