mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-21 11:27:38 +03:00
Remove extraneous enforce_single_instance() code & add opening of journal lock file
This commit is contained in:
parent
4689666b13
commit
937a38f0b5
@ -41,6 +41,9 @@ if __name__ == '__main__':
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if __name__ == "__main__":
|
||||
journal_dir_lockfile = None
|
||||
|
||||
def no_other_instance_running() -> bool: # noqa: CCR001
|
||||
"""
|
||||
Ensure only one copy of the app is running for the configured journal directory.
|
||||
@ -49,6 +52,9 @@ if __name__ == '__main__':
|
||||
"""
|
||||
journal_dir = config.get('journaldir') or config.default_journal_dir
|
||||
|
||||
if sys.platform == 'win32':
|
||||
journal_dir_lockfile = open(join(journal_dir, 'edmc-journal-lock.txt'), mode='a+', encoding='utf-8')
|
||||
|
||||
return True
|
||||
|
||||
def already_running_popup():
|
||||
|
Loading…
x
Reference in New Issue
Block a user