From a76e1b9d35108a1bae43768a8d3aca0700ffd6af Mon Sep 17 00:00:00 2001 From: Georg Date: Mon, 13 Sep 2021 15:12:54 +0200 Subject: Support for empty descriptions in Syncer Signed-off-by: Georg --- scripts/gitea_cgit_description_syncer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/gitea_cgit_description_syncer.py b/scripts/gitea_cgit_description_syncer.py index 0a878e1..b26bd90 100755 --- a/scripts/gitea_cgit_description_syncer.py +++ b/scripts/gitea_cgit_description_syncer.py @@ -52,6 +52,9 @@ description_local = file_content.replace('\n', '') print(f"Description (Local): {description_local}") if description_gitea == description_local: print("Matches, nothing to change.") +elif not description_gitea: + print("Empty - Writing placeholder.") + Path(file_path).write_text('Untitled / Work in Progress.') else: print("Does not match, replacing local file.") Path(file_path).write_text(description_gitea) -- cgit v1.2.3