Skip to content

Commit 4edd698

Browse files
committed
refactor: fix the flake8 error F824
1 parent ec40b44 commit 4edd698

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

qiniu/http/regions_provider.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ def __init__(self, fd):
161161

162162
def __enter__(self):
163163
with _file_threading_lockers_lock:
164-
global _file_threading_lockers
165164
threading_lock = _file_threading_lockers.get(self._file_path, threading.Lock())
166165
# Could use keyword style `acquire(blocking=False)` when min version of python update to >= 3
167166
if not threading_lock.acquire(False):
@@ -170,7 +169,6 @@ def __enter__(self):
170169

171170
def __exit__(self, exc_type, exc_val, exc_tb):
172171
with _file_threading_lockers_lock:
173-
global _file_threading_lockers
174172
threading_lock = _file_threading_lockers.get(self._file_path)
175173
if threading_lock and threading_lock.locked():
176174
threading_lock.release()

0 commit comments

Comments
 (0)