From da6a0ca933ada9cf9d0ee726ad287d90dd8f994c Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Wed, 11 Sep 2019 16:45:09 +0300 Subject: [PATCH] lock: remove unused `lifetime` argument --- dvc/lock.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dvc/lock.py b/dvc/lock.py index f552cbae6..3ab223adf 100644 --- a/dvc/lock.py +++ b/dvc/lock.py @@ -30,16 +30,11 @@ if is_py3: Args: lockfile (str): the lock filename in. - lifetime (int | timedelta): hold the lock for so long. tmp_dir (str): a directory to store claim files. """ - def __init__(self, lockfile, lifetime=None, tmp_dir=None): - if lifetime is None: - lifetime = timedelta(days=365) # Lock for good by default - elif isinstance(lifetime, int): - lifetime = timedelta(seconds=lifetime) - + def __init__(self, lockfile, tmp_dir=None): + lifetime = timedelta(days=365) # Lock for good by default self._tmp_dir = tmp_dir if self._tmp_dir is not None: makedirs(self._tmp_dir, exist_ok=True) @@ -83,7 +78,7 @@ else: Uses zc.lockfile as backend. """ - def __init__(self, lockfile, lifetime=None, tmp_dir=None): + def __init__(self, lockfile, tmp_dir=None): self.lockfile = lockfile self._lock = None