File: 0027-Use-text-file-instead-of-BZip2-compressed-file.patch

package info (click to toggle)
calibre 6.13.0%2Brepack-2%2Bdeb12u5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,147,768 kB
  • sloc: python: 461,364; ansic: 80,698; cpp: 18,081; javascript: 2,855; xml: 1,297; sh: 892; sql: 683; objc: 544; makefile: 71; perl: 66; sed: 6
file content (25 lines) | stat: -rw-r--r-- 946 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Date: Mon, 20 Feb 2023 02:27:39 +0900
Subject: Use text file instead of BZip2 compressed file

---
 setup/browser_data.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup/browser_data.py b/setup/browser_data.py
index 25aa488..df9835d 100644
--- a/setup/browser_data.py
+++ b/setup/browser_data.py
@@ -24,10 +24,10 @@ def filter_ans(ans):
 
 def common_user_agents():
     print('Getting recent UAs...')
-    p = Path.cwd() / "debian" / "resources-src" / "recent_uas" / "common_user_agents.bz2"
+    p = Path.cwd() / "debian" / "resources-src" / "recent_uas" / "common_user_agents"
     raw = download_from_calibre_server(p.as_uri())
     ans = {}
-    for line in bz2.decompress(raw).decode('utf-8').splitlines():
+    for line in raw.decode('utf-8').splitlines():
         count, ua = line.partition(':')[::2]
         count = int(count.strip())
         ua = ua.strip()