ops xor was wrong

This commit is contained in:
əlemi 2022-04-28 12:57:40 +02:00
parent 7c4c523562
commit 8503a36df4
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E

View file

@ -107,7 +107,7 @@ class Treepuncher(
self.logger.warning("Saved session uses a different version") self.logger.warning("Saved session uses a different version")
prev_auth = self.storage.auth() prev_auth = self.storage.auth()
if prev_auth: if prev_auth:
if prev_auth.legacy ^ isinstance(authenticator, MicrosoftAuthenticator): if prev_auth.legacy ^ isinstance(authenticator, MojangAuthenticator):
self.logger.warning("Saved session is incompatible with configured authenticator") self.logger.warning("Saved session is incompatible with configured authenticator")
authenticator.deserialize(prev_auth.token) authenticator.deserialize(prev_auth.token)
self.logger.info("Loaded session from %s", prev_auth.date) self.logger.info("Loaded session from %s", prev_auth.date)