summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gemfeed.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/gemfeed.py b/gemfeed.py
index 04b9217..39dd8ad 100644
--- a/gemfeed.py
+++ b/gemfeed.py
@@ -14,15 +14,14 @@ def is_world_readable(filename):
def get_feed_title():
default = "Just another Gemini feed"
- for extension in ("gmi", "gem", "gemini"):
- filename = "index.{}".format(extension)
- if os.path.exists(filename) and is_world_readable(filename):
- return extract_first_heading(filename, default)
+ for index_file in ("index.gmi", "index.gemini"):
+ if os.path.exists(index_file) and is_world_readable(index_file):
+ return extract_first_heading(index_file, default)
return default
def find_files(n=10):
files = []
- for extension in ("gmi", "gem", "gemini"):
+ for extension in ("gmi", "gemini"):
files.extend(glob.glob("*.{}".format(extension)))
index = "index.{}".format(extension)
if index in files: