From 4b9b1ff98e4ce6af40190c4ef0069c3fac116f65 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 28 Aug 2018 01:22:09 +0200 Subject: [PATCH] [fix] shadowing variable name --- run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index 135b361..7652ad9 100644 --- a/run.py +++ b/run.py @@ -339,8 +339,8 @@ def require_token(): api_logger.warning("No tokens available and a user is trying to access the API") return response.json({'status': 'invalide token'}, 403) - async with aiofiles.open('tokens', mode='r') as f: - tokens = await f.read() + async with aiofiles.open('tokens', mode='r') as file: + tokens = await file.read() tokens = {x.strip() for x in tokens.split("\n") if x.strip()} token = request.headers["X-Token"].strip()