Skip to content

Commit c3179d2

Browse files
walker-jCharlesworth
authored andcommitted
Linting
1 parent 280aa5c commit c3179d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

evasdk/eva_locker.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
# TODO properly handle exceptions thrown in the renewal thread
77
# TODO properly handle unlock on program exit
88

9+
910
class EvaWithLocker:
1011
"""
1112
The EvaWithLocker class is used to keep an Eva locked for the entirety of a Python 'with' scope.
1213
It expects an already locked Eva object to be passed in, and for the duration of the
13-
with scope it will renew the lock every <renew_period> seconds.
14+
with scope it will renew the lock every <renew_period> seconds.
1415
1516
'with' scopes can be nested, with the lock being renewed in a particular
1617
scope for the currently set 'renew_period' of the locker. At the end of the outer-most scope
@@ -28,7 +29,7 @@ def __init__(self, eva, fallback_renew_period=30):
2829

2930

3031
def set_renew_period(self, renew_period=None):
31-
if renew_period == None:
32+
if renew_period is None:
3233
self.__renew_period = self.__fallback_renew_period
3334
else:
3435
self.__renew_period = renew_period
@@ -58,7 +59,7 @@ def __enter__(self):
5859

5960
def __exit__(self, type, value, traceback):
6061
context_end_size = None
61-
62+
6263
with self.__cond:
6364
self.__period_stack.pop()
6465
self.__reset_timer()

0 commit comments

Comments
 (0)