diff --git a/test_helper/test_sphinx_book/test_book_html.py b/test_helper/test_sphinx_book/test_book_html.py index 995aa36d8..9dd902b1d 100644 --- a/test_helper/test_sphinx_book/test_book_html.py +++ b/test_helper/test_sphinx_book/test_book_html.py @@ -79,9 +79,7 @@ def get_html(self, html_file): Soup = bs4.BeautifulSoup(File, features="html.parser") title = Soup.title.text.split('—')[0] content = Soup.select('.body')[0] - conz = '' - for a in content: - conz += str(a) + '\n' + conz = '' + '\n'.join([str(a) for a in content]) return {'title': title, 'cnt': conz} diff --git a/torcms_taginfo/run_export_meta.py b/torcms_taginfo/run_export_meta.py index bf036263d..bae2d9b8d 100644 --- a/torcms_taginfo/run_export_meta.py +++ b/torcms_taginfo/run_export_meta.py @@ -40,8 +40,7 @@ def export_data(): for rec in recs: label = '' rec_label = MPost2Label.get_by_uid(rec.uid).objects() - for r_label in rec_label: - label += r_label.tag_name + ',' + label += ','.join([r_label.tag_name for r_label in rec_label]) infos = MPost.query_by_extinfo(key='cpbh', val=rec.extinfo['cpbh']) for info in infos: