diff --git a/ttbp/config/__init__.py b/ttbp/config/__init__.py index ad978c2..942400f 100644 --- a/ttbp/config/__init__.py +++ b/ttbp/config/__init__.py @@ -76,13 +76,13 @@ NOPUB = os.path.join(USER_CONFIG, "nopub") ## UI BANNER = ''' -__________________________________________________________ +___________________________________________________________ | | | the tilde.town | | ____ ____ ____ _ ____ ____ _ _ ____ _ _ _ ____ | | |___ |___ |___ | [__ |___ |\ | | __ | |\ | |___ | | | |___ |___ |___ ___] |___ | \| |__] | | \| |___ | -| ver 0.11.0 (rainbows) | +| ver 0.11.1 (rainbows) | |__________________________________________________________| '''.lstrip() @@ -139,4 +139,11 @@ version 0.9.3 features: * ~login created centralfeels, which is an opt-in collection of html-published feels; create a blank file called '.centralfeels' in your home directory if you'd like to be included!""", + "0.11.1": """ +~[version 0.11.1 update]~ + + * a quick patch to correct a directory listing error, nothing too + exciting + * general PSA: feel free to use the github repo for bugs/feature requests: + https://github.com/modgethanc/ttbp/issues""", } diff --git a/ttbp/core.py b/ttbp/core.py index 381d726..3c358c0 100644 --- a/ttbp/core.py +++ b/ttbp/core.py @@ -405,7 +405,10 @@ def www_neighbors(): url = config.LIVE+user+"/"+userRC["publish dir"] lastfile = "" - files = os.listdir(os.path.join("/home", user, ".ttbp", "entries")) + try: + files = os.listdir(os.path.join("/home", user, ".ttbp", "entries")) + except OSError: + files = [] files.sort() for filename in files: if valid(filename): diff --git a/ttbp/ttbp.py b/ttbp/ttbp.py index 971902b..54605a1 100644 --- a/ttbp/ttbp.py +++ b/ttbp/ttbp.py @@ -50,7 +50,7 @@ from . import chatter from . import gopher from . import util -__version__ = "0.11.0" +__version__ = "0.11.1" __author__ = "endorphant to explore your feels.\n\n") core.load(SETTINGS) @@ -637,7 +635,10 @@ def view_neighbors(users, prompt): url = config.LIVE+user+"/"+userRC.get("publish dir") ## find last entry - files = os.listdir(os.path.join("/home", user, ".ttbp", "entries")) + try: + files = os.listdir(os.path.join("/home", user, ".ttbp", "entries")) + except OSError: + files = [] files.sort() lastfile = "" for filename in files: @@ -918,7 +919,10 @@ def view_feed(): for townie in core.find_ttbps(): entryDir = os.path.join("/home", townie, ".ttbp", "entries") - filenames = os.listdir(entryDir) + try: + filenames = os.listdir(entryDir) + except OSError: + filenames = [] for entry in filenames: ## hardcoded display cutoff at 30 days @@ -1268,19 +1272,25 @@ you're all good to go, """+chatter.say("friend")+"""! please contact ~endorphant something strange happened to you during this update. """) - if z < 1 or y < 10: + if y < 10: # version 0.10.1 patch notes print(config.UPDATES["0.10.1"]) if y < 11: - # version 0.11.1 patch notes + # version 0.11.0 patch notes print(config.UPDATES["0.11.0"]) + if y < 11 or z < 1: + # version 0.11.1 patch notes + print(config.UPDATES["0.11.1"]) + confirm = "" while confirm not in ("x", "", "X", ""): confirm = input("\nplease type when you've finished reading about the updates! ") + print("\n\n") + open(versionFile, "w").write(__version__) #####