Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
QuinnDamerell committed Aug 16, 2024
1 parent 4b08ad8 commit 50c80aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions bambu_octoeverywhere/bambuhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def GetDevConfigStr(self, devConfig, value):
def Rekey(self, reason:str):
#pylint: disable=logging-fstring-interpolation
self.Logger.error(f"HOST REKEY CALLED {reason} - Clearing keys...")
# It's important we clear the key, or we will reload, fail to connect, try to rekey, and restart again!
self.Secrets.SetPrinterId(None)
self.Secrets.SetPrivateKey(None)
self.Logger.error("Key clear complete, restarting plugin.")
Expand Down
1 change: 1 addition & 0 deletions moonraker_octoeverywhere/moonrakerhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def GetDevConfigStr(self, devConfig, value):
def Rekey(self, reason:str):
#pylint: disable=logging-fstring-interpolation
self.Logger.error(f"HOST REKEY CALLED {reason} - Clearing keys...")
# It's important we clear the key, or we will reload, fail to connect, try to rekey, and restart again!
self.Secrets.SetPrinterId(None)
self.Secrets.SetPrivateKey(None)
self.Logger.error("Key clear complete, restarting plugin.")
Expand Down
5 changes: 3 additions & 2 deletions octoprint_octoeverywhere/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,9 @@ def OnRekeyCommand(self):
def Rekey(self, reason:str):
#pylint: disable=logging-fstring-interpolation
self._logger.error(f"HOST REKEY CALLED {reason} - Clearing keys...")
#self.SaveToSettingsIfUpdated("PrinterKey", "")
#self.SaveToSettingsIfUpdated("Pid", "")
# It's important we clear the key, or we will reload, fail to connect, try to rekey, and restart again!
self.SaveToSettingsIfUpdated("PrinterKey", "")
self.SaveToSettingsIfUpdated("Pid", "")
self._logger.error("Key clear complete, restarting plugin.")
HostCommon.RestartPlugin()

Expand Down

0 comments on commit 50c80aa

Please sign in to comment.