File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ def __init__(
130130 token is *not* stored in thread local storage, then
131131 thread-1 would see the token value as "xyz" and would be
132132 able to successfully release the thread-2's lock.
133-
133+
134134 ``raise_on_release_error`` indicates whether to raise an exception when
135135 the lock is no longer owned when exiting the context manager. By default,
136136 this is True, meaning an exception will be raised. If False, the warning
@@ -174,12 +174,11 @@ async def __aenter__(self):
174174 async def __aexit__ (self , exc_type , exc_value , traceback ):
175175 try :
176176 await self .release ()
177- except LockNotOwnedError as e :
177+ except LockNotOwnedError :
178178 if self .raise_on_release_error :
179179 raise
180180 logger .warning ("Lock was no longer owned when exiting context manager." )
181181
182-
183182 async def acquire (
184183 self ,
185184 blocking : Optional [bool ] = None ,
Original file line number Diff line number Diff line change @@ -180,9 +180,9 @@ def __exit__(
180180 ) -> None :
181181 try :
182182 self .release ()
183- except LockNotOwnedError as e :
183+ except LockNotOwnedError :
184184 if self .raise_on_release_error :
185- raise e
185+ raise
186186 logger .warning ("Lock was no longer owned when exiting context manager." )
187187
188188 def acquire (
You can’t perform that action at this time.
0 commit comments