File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -146,18 +146,18 @@ def generate_sitemaps(filename: str) -> None:
146146 with open (filename ) as f :
147147 rows = (line .strip ().split ("\t " ) for line in f )
148148
149- for sortkey , chunk in itertools .groupby (rows , lambda row : row [0 ]):
150- things = []
151-
152- _chunk = list (chunk )
153- for segment in _chunk :
154- sortkey = segment .pop (0 )
155- last_modified = segment .pop (- 1 )
156- path = '' .join (segment )
157- things .append (web .storage (path = path , last_modified = last_modified ))
158-
159- if things :
160- write (f"sitemaps/sitemap_{ sortkey } .xml.gz" , sitemap (things ))
149+ for sortkey , chunk in itertools .groupby (rows , lambda row : row [0 ]):
150+ things = []
151+
152+ _chunk = list (chunk )
153+ for segment in _chunk :
154+ sortkey = segment .pop (0 )
155+ last_modified = segment .pop (- 1 )
156+ path = '' .join (segment )
157+ things .append (web .storage (path = path , last_modified = last_modified ))
158+
159+ if things :
160+ write (f"sitemaps/sitemap_{ sortkey } .xml.gz" , sitemap (things ))
161161
162162
163163@elapsed_time ("generate_siteindex" )
You can’t perform that action at this time.
0 commit comments