summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolderpunk <solderpunk@sdf.org>2020-03-17 13:35:37 +0100
committerSolderpunk <solderpunk@sdf.org>2020-03-17 13:35:37 +0100
commit63365f07426d618791a54ce879bcb4163da2e814 (patch)
treec5ea611e09a1d4263c413ce004ebef050af9782a
parent3fdaabb810570be9a17dc7222b6a199468485f18 (diff)
Don't produce empty feeds.
-rw-r--r--gemfeed.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gemfeed.py b/gemfeed.py
index 3d9c3d7..04b9217 100644
--- a/gemfeed.py
+++ b/gemfeed.py
@@ -108,6 +108,10 @@ def main():
# Add one entry per .gmi file
files = find_files(args.n)
+ if not files:
+ print("No world-readable Gemini content found! :(")
+ return
+
for n, filename in enumerate(files):
entry = feed.add_entry()
populate_entry_from_file(filename, args.base_url, entry)