mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-10-12 01:10:45 +00:00
Small adjustment on sign_out function (#603)
* Small adjustment on sing_out function First, thanks for this. It has been a great help. I was having trouble with this function, getting a TypeError (TypeError: can only concatenate str (not "NoneType") to str) because apparently the second os.remove(session_cache_path()) is trying to delete a file that does not exist anymore so this is what worked for me. * Change description on app.py file * Update app.py on line 79 Fixed indent
This commit is contained in:
1 parent
8198947428
commit
3f2592d631
2 files changed
+3
-3
No files matched your search
+1
-2
@@ -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('/')
|
||||
|
||||
Reference in new issue
Block a user