summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg2021-09-13 15:12:54 +0200
committerGeorg2021-09-13 15:12:54 +0200
commita76e1b9d35108a1bae43768a8d3aca0700ffd6af (patch)
treef6d4d4dd3402ee8ad9c30e2f2e249d08bc93a7a9
parent6204a4b5dd1eb16aa30027a1e682ea5d8c37ff00 (diff)
downloadgit-a76e1b9d35108a1bae43768a8d3aca0700ffd6af.tar.gz
git-a76e1b9d35108a1bae43768a8d3aca0700ffd6af.tar.bz2
git-a76e1b9d35108a1bae43768a8d3aca0700ffd6af.zip
Support for empty descriptions in SyncerHEADmaster
Signed-off-by: Georg <georg@lysergic.dev>
-rwxr-xr-xscripts/gitea_cgit_description_syncer.py3
1 files changed, 3 insertions, 0 deletions
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)