Commit Graph
2509 Commits
Author SHA1 Message Date
Athanasius d13ebafcba ChangeLog: Point macOS people to the updated docs. 2021-03-15 19:15:46 +00:00
Athanasius 977fec25b0 Release 4.2.1: appversion and changelog 2021-03-15 19:11:27 +00:00
Athanasius 868cb97ffc Merge pull request #916 from EDCD/fix/907/damaged-station-modules-is-list
plugins/eddn: Add paranoia about data in is_horizons()
2021-03-15 17:27:24 +00:00
Athanasius 2da5e0a666 Merge pull request #915 from A-UNDERSCORE-D/fix/908/capidata-not-dict
Ensured that CAPIData objects are JSON Serialisable
2021-03-15 17:14:08 +00:00
Athanasius 173cffdcfc Add extra logging to is_horizons() if things not as expected.
* Log the type(s) if not dict.
* Log if ships['shipyard_list'] isn't present, despite ships being a
  dict.
2021-03-15 17:06:26 +00:00
Athanasius 98be182922 plugins/eddn: Add paranoia about data in is_horizons()
A damaged station has `"modules": []`, so trips over modules.values().
2021-03-15 17:03:39 +00:00
A_D fbe3e7a6e5 Ensured that CAPIData objects are JSON Serialisable
While it isnt directly an issue in main (right now), the fix applies
here forward, so we may as well do it here and not deal with a headache
later.
2021-03-15 18:53:20 +02:00
Athanasius ec7e19b7c1 Merge branch 'release-4.2.1' 2021-03-15 16:47:55 +00:00
Athanasius d39d052e13 Merge pull request #914 from EDCD/enhancement/909/extra-frontier-auth-logging
Add extra logging for Frontier Auth, especially via edmc://
2021-03-15 16:47:30 +00:00
Athanasius 09e93068ab Merge branch 'release-4.2.1' 2021-03-15 16:17:51 +00:00
Athanasius 7707a811cb Merge branch 'release-4.2.1' 2021-03-15 16:09:21 +00:00
Athanasius fbcdf05e2b Merge pull request #913 from EDCD/fix/910/journallock-when-dir-none
JournalLock: Check for journal_dir of None
2021-03-15 16:09:05 +00:00
Athanasius f1c50faafa logger.exception() doesn't need exc_info 2021-03-15 15:58:18 +00:00
Athanasius cc2395ca04 Add similar extra logging for localhost handler
* This also adjusts the logging in Session.auth_callback() because it
  can be called from either protocol.  Saying 'edmc://' there is
  misleading.
2021-03-15 12:13:28 +00:00
Athanasius 4f524a0a35 Add extra logging for Frontier Auth, especially via edmc:// 2021-03-15 12:07:39 +00:00
Athanasius fa49159de5 JournalLock: Catch when journal_dir is None
* If it's None then set journal_dir_path to None as well.  Setting '' or
  nothing results in '.' (CWD), which could cause other issues.
* As we do this in three places, it's in a helper function.
* New JournalLockResult.JOURNALDIR_IS_NONE to signal this.
* Fix checking of return from obtain_lock() to specifically reference
  JournalLockResult.ALREADY_LOCKED.
2021-03-15 11:20:46 +00:00
Athanasius 2b18b9d859 Merge branch 'release-4.2.0' 2021-03-15 09:21:58 +00:00
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 e76e76bbe4 Add MacOS pyobjc to requirements.txt 2021-03-13 22:30:24 +00:00
Athanasius 84590720ef journal_lock: Revert to deprecated config.get() method
Those changes are only in `develop` at this stage.
Release/4.2.0
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
Athanasius c14dc1fb1d 4.2.0: Additional changelog entry about "CAPI: No commander data returned" 2021-03-12 12:44:39 +00:00
Athanasius 5b1bd01c56 Release 4.2.0: appversion and changelog 2021-03-12 12:39:42 +00:00
Athanasius 734ef96def Merge branch 'release-4.2.0-beta3' 2021-03-09 12:45:37 +00:00
Athanasius 773629afbe Pre-Release 4.2.0-beta3: version and changelog Release/4.2.0-beta3 2021-03-09 12:43:48 +00:00
Athanasius a6939c77d9 Backport of fix/891/force-localserver-for-auth_fix-journallock-import
* Move JournalLock into its own file.
2021-03-09 12:37:59 +00:00
Athanasius 4658b267fb PLUGINS: Document that CargoJSON isn't initially populated.
Blame Frontier for deciding to put this in-Journal on the first event at
login, but in the separate file after that.
2021-03-09 12:27:00 +00:00
Athanasius 038d16671c Correct URL format Release/4.2.0-beta2 2021-03-06 19:16:56 +00:00
Athanasius 875ccd08f5 Document that GitHub renders runas command correctly 2021-03-06 19:12:12 +00:00
Athanasius 9d816eaa79 un-double the blackslashes in changelog 2021-03-06 19:09:41 +00:00
Athanasius c461f5d45b 4.2.0-beta2: changelog: Attempt to cite actually tested runas command 2021-03-06 19:07:04 +00:00
Athanasius 8052998658 Pre-Release 4.2.0-beta2: version and changelog 2021-03-06 18:55:35 +00:00
Athanasius 71858357eb CAPI: Log if no commander in profile() data 2021-03-06 18:54:24 +00:00
Athanasius 67a91cf7d1 CAPI: Handle when we get no 'commander' in returned data.
I was testing the new Steam or Epic CAPI auth.  My EGS account hasn't
yet been used, so has no commander attached.  EDMC thinks the auth has
succeeded in this case, but hitting 'Update' causes it to error because
the returned data is empty.

So, add some checks for lack of 'commander' key and a specific message
"CAPI: No commander data returned" for status line.

Without this there's a KeyError exception thrown, causing the status
line to just get 'commander' in it, which isn't helpful.
2021-03-06 18:54:18 +00:00
Athanasius 5f3bd9be71 Add Steam and EGS to Frontier Auth audiences. 2021-03-06 18:54:12 +00:00
Athanasius 79ad7a596a Pre-Release 4.2.0-beta1: version and changelog Release/4.2.0-beta1 2021-03-06 11:09:05 +00:00
Athanasius 2037cf73a5 Merge pull request #886 from EDCD/enhancement/870-frontier-auth-via-steam-or-egs
Add Steam and EGS to Frontier Auth audiences.
2021-03-06 10:56:04 +00:00
Athanasius 5d39dee900 CAPI: Log if no commander in profile() data 2021-03-06 10:54:15 +00:00
Athanasius b11be09b56 CAPI: Handle when we get no 'commander' in returned data.
I was testing the new Steam or Epic CAPI auth.  My EGS account hasn't
yet been used, so has no commander attached.  EDMC thinks the auth has
succeeded in this case, but hitting 'Update' causes it to error because
the returned data is empty.

So, add some checks for lack of 'commander' key and a specific message
"CAPI: No commander data returned" for status line.

Without this there's a KeyError exception thrown, causing the status
line to just get 'commander' in it, which isn't helpful.
2021-03-05 16:57:02 +00:00
Athanasius e3d2fa40b7 Add Steam and EGS to Frontier Auth audiences. 2021-03-05 16:27:23 +00:00
Athanasius 87859720ac Merge pull request #882 from EDCD/enhancement/859-journal-lock-on-change
Update Journal lock if user changes directory
2021-03-05 16:18:40 +00:00
Athanasius 8c2609858f L10n: Removed extraneous 'WIBBLE'. 2021-03-05 16:13:10 +00:00
Athanasius 696d55a165 L10n: Add missing " character 2021-03-05 16:09:30 +00:00
Athanasius d8e9748c88 Small tweak to "couldn't lock" message 2021-03-05 16:02:36 +00:00
Athanasius e430c3b350 Refactor old no_other_instance_running() into handle_edmc_callback_or_foregrounding()
The actual duplicate process checks *used* to be done in this function,
but no longer are.  Instead it's now specifically performing the "is
this an edmc:// auth callback?" check, including the foreground of the
extant process if needs be.
2021-03-05 15:57:53 +00:00
Athanasius f3ef653a8d Change journal changed locking strings to translations. 2021-03-05 15:46:30 +00:00
Athanasius 09cc677a42 L10n: Add new strings for changed journal locking 2021-03-05 15:44:35 +00:00
Athanasius 1663238cd0 Tweak comment about 'not locked' meaning doing edmc:// checks 2021-03-05 15:25:01 +00:00
Athanasius f449286983 Implement retry of locking when journal dir changed.
In case the user does have another EDMC instance running that they need
to kill first.
2021-03-05 15:08:13 +00:00