Skip to content

Commit

Permalink
Make code a bit simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Aug 12, 2022
1 parent de16ffa commit 16822c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tribler/core/utilities/process_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ class ProcessChecker:
"""

def __init__(self, directory: Path, lock_file_name: Optional[str] = None):
lock_file_name = lock_file_name or LOCK_FILE_NAME
self.lock_file = directory / lock_file_name
self.logger = logging.getLogger(self.__class__.__name__)
self.lock_file = directory / (lock_file_name or LOCK_FILE_NAME)
self.re_tribler = re.compile(r'tribler\b(?![/\\])')
self.logger.info(f'Lock file: {self.lock_file}')
self.re_tribler = re.compile(r'tribler\b(?![/\\])')

def check_and_restart_if_necessary(self) -> bool:
self.logger.info('Check')
Expand Down

0 comments on commit 16822c0

Please sign in to comment.