diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 7cfda5c2..55fd4bd5 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -43,6 +43,8 @@ if __name__ == '__main__': if __name__ == "__main__": journal_dir = config.get('journaldir') or config.default_journal_dir + # This must be at top level to guarantee the file handle doesn't go out + # of scope and get cleaned up, removing the lock with it. journal_dir_lockfile = open(join(journal_dir, 'edmc-journal-lock.txt'), mode='w+', encoding='utf-8') def no_other_instance_running() -> bool: # noqa: CCR001