mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-03 11:04:06 +02:00
...
This commit is contained in:
parent
1c389964cc
commit
38ae23cbab
1 changed files with 2 additions and 0 deletions
|
|
@ -286,6 +286,8 @@ def get_list(self):
|
|||
|
||||
def run(self, opts):
|
||||
lines = self.get_list()[:10]
|
||||
if not lines:
|
||||
raise RuntimeError('Failed to download list of common user agents')
|
||||
with open(self.UA_PATH, 'wb') as f:
|
||||
f.write('\n'.join(lines).encode('ascii'))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue