1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 16:27:13 +03:00

4 Commits

Author SHA1 Message Date
Athanasius
1cd0392527 Record if JournalLock.obtain_lock() succeeded, use in release_lock()
In the scenario of the default Journals location not even existing the
user needs might update it to a network mount.  When they do so we
attempt, and fail, to unlock the old location, despite it not being
locked.

So now we have this boolean so we know if we should even attempt
unlocking.
2021-03-13 22:32:40 +00:00
Athanasius
60c67723ca Change JournalLock.obtain_lock() return to an Enum.
This way we can tell the difference between:

1. This process obtained the lock.
2. Another process has the lock.
3. We couldn't get the lock due to not being able to open the lock file
   read-write.

Case 3 is currently also returned if the configured journal directory
doesn't exist.  This will be the case on any MacOS system that never had
the game running.  Likely given the OS hasn't been supported for the
game in years now.
2021-03-13 22:32:33 +00:00
Athanasius
84590720ef journal_lock: Revert to deprecated config.get() method
Those changes are only in `develop` at this stage.
2021-03-12 12:52:15 +00:00
Athanasius
c565422b54 Actually add journal_lock.py into this branch
I'd `git show develop:journal_lock.py > journal_lock.py` a copy in
before, but forgot to commit it, and then removed it when checking out
another branch complained.  D'oh!
2021-03-12 12:49:17 +00:00