Skip to content

Commit 04d4756

Browse files
IMayBeABitShybenoit74
authored andcommitted
fix zimscraperlib version requirement; minor rewrite
1 parent 199ba3b commit 04d4756

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
kiwixstorage>=0.8.1,<1.0
22
pif>=0.8.2,<0.9
3-
zimscraperlib>=3.2.0,<4.0
3+
zimscraperlib>=3.3.0,<4.0
44
xml_to_dict>=0.1.6,<0.2
55
cli-formatter>=1.2.0,<1.3
66
py7zr>=0.20.4,<0.21

src/sotoki/scraper.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,11 @@ def sanitize_inputs(self):
7878
self.conf.title = self.conf.title.strip()
7979

8080
default_description = Global.site["Tagline"].strip()
81-
if self.conf.description is not None:
81+
if self.conf.description:
8282
user_description = self.conf.description.strip()
8383
else:
8484
user_description = None
85-
user_long_description = self.conf.long_description
86-
description, long_description = compute_descriptions(default_description, user_description, user_long_description)
87-
self.conf.description = description
88-
self.conf.long_description = long_description
85+
self.conf.description, self.conf.long_description = compute_descriptions(default_description, user_description, self.conf.long_description)
8986

9087
if not self.conf.author:
9188
self.conf.author = "Stack Exchange"

0 commit comments

Comments
 (0)