diff --git a/python_dynamodb_lock/python_dynamodb_lock.py b/python_dynamodb_lock/python_dynamodb_lock.py index 5dbeec9a..5e6084ac 100644 --- a/python_dynamodb_lock/python_dynamodb_lock.py +++ b/python_dynamodb_lock/python_dynamodb_lock.py @@ -391,8 +391,8 @@ def acquire_lock(self, logger.info('Trying to acquire lock for: %s, %s', partition_key, sort_key) # plug in default values as needed - if not retry_period: retry_period = self._heartbeat_period - if not retry_timeout: retry_timeout = self._lease_duration + self._heartbeat_period + if retry_period is None: retry_period = self._heartbeat_period + if retry_timeout is None: retry_timeout = self._lease_duration + self._heartbeat_period # create the "new" lock that needs to be acquired new_lock = DynamoDBLock(