Skip to content

Commit

Permalink
* Remove unused imports
Browse files Browse the repository at this point in the history
* removed fd that is yielded
  • Loading branch information
Lukas Abelt committed Sep 13, 2023
1 parent 007eb8a commit f49906a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions varats-core/varats/provider/patch/patch_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
"""

import os
import random
import time
import typing as tp
import warnings
from pathlib import Path
from time import sleep

import benchbuild as bb
import yaml
Expand Down
2 changes: 1 addition & 1 deletion varats-core/varats/utils/filesystem_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def lock_file(lock_path: Path, lock_mode: int = fcntl.LOCK_EX) -> tp.Generator:
lock_fd = os.open(lock_path, open_mode)
try:
fcntl.flock(lock_fd, lock_mode)
yield lock_fd
yield
finally:
fcntl.flock(lock_fd, fcntl.LOCK_UN)
os.close(lock_fd)

0 comments on commit f49906a

Please sign in to comment.