fixing more eject bugs

master
endorphant 2016-05-04 20:22:14 -04:00
parent e8607aa42d
commit 3491cc7843
1 changed files with 10 additions and 4 deletions

View File

@ -382,7 +382,10 @@ def view_feed():
entryDir = os.path.join("/home", townie, ".ttbp", "entries")
filenames = os.listdir(entryDir)
for entry in filenames:
feedList.append(os.path.join(entryDir, entry))
### REALLY MAKE A REAL FILENAME VALIDATOR
fileSplit = os.path.splitext(entry)
if len(fileSplit[0]) == 8 and fileSplit[1] == ".txt":
feedList.append(os.path.join(entryDir, entry))
metas = core.meta(feedList)
metas.sort(key = lambda entry:entry[3])
@ -421,7 +424,10 @@ def list_select(options, prompt):
invalid = True
while invalid:
choice = raw_input("\n\n"+prompt)
try:
choice = raw_input("\n\n"+prompt)
except KeyboardInterrupt:
list_select(options, prompt)
try:
ans = int(choice)