diff --git a/CHANGELOG.md b/CHANGELOG.md index 43e26bd..010cc74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -// Add your changes here and then delete this line +### Changed +- moved os.remove(session_cache_path()) inside try block to avoid TypeError on app.py example file ## [2.16.1] - 2020-10-24 diff --git a/examples/app.py b/examples/app.py index 5b93c10..188b4eb 100644 --- a/examples/app.py +++ b/examples/app.py @@ -73,11 +73,10 @@ def index(): @app.route('/sign_out') def sign_out(): - os.remove(session_cache_path()) - session.clear() try: # Remove the CACHE file (.cache-test) so that a new user can authorize. os.remove(session_cache_path()) + session.clear() except OSError as e: print ("Error: %s - %s." % (e.filename, e.strerror)) return redirect('/')