mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
1c389964cc
commit
38ae23cbab
@ -286,6 +286,8 @@ class RecentUAs(Command):
|
||||
|
||||
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…
x
Reference in New Issue
Block a user