Skip to content

Commit

Permalink
Merge pull request #75 from home-assistant-libs/more-python-controlle…
Browse files Browse the repository at this point in the history
…r-cleanups

Update Python controller bindings with latest patches
  • Loading branch information
agners committed Jun 17, 2024
2 parents d8fd88a + 4aed874 commit a126933
Show file tree
Hide file tree
Showing 7 changed files with 1,572 additions and 0 deletions.
401 changes: 401 additions & 0 deletions 0020-Python-Drop-deprecated-discovery-APIs-33882.patch

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions 0021-Remove-unnecessary-error-log-from-CurrentFabricRemov.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 92f9e7d0d746087ff4c6b0d86b80f7deba661d5d Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 13 Jun 2024 16:13:56 +0200
Subject: [PATCH] Remove unnecessary error log from CurrentFabricRemover
(#33896)

* Remove unnecessary error log from CurrentFabricRemover

Currently, when the CurrentFabricRemover is successful it logs the
following error with err log level:

Remove Current Fabric Result : src/controller/CurrentFabricRemover.cpp:133: Success

Get rid of the message if successful, it is confusing.

* Add braces to if statement
---
src/controller/CurrentFabricRemover.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/controller/CurrentFabricRemover.cpp b/src/controller/CurrentFabricRemover.cpp
index be89731b24..899860a028 100644
--- a/src/controller/CurrentFabricRemover.cpp
+++ b/src/controller/CurrentFabricRemover.cpp
@@ -145,7 +145,10 @@ void CurrentFabricRemover::OnCommandFailure(void * context, CHIP_ERROR err)

void CurrentFabricRemover::FinishRemoveCurrentFabric(void * context, CHIP_ERROR err)
{
- ChipLogError(Controller, "Remove Current Fabric Result : %" CHIP_ERROR_FORMAT, err.Format());
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Controller, "Remove Current Fabric Failed : %" CHIP_ERROR_FORMAT, err.Format());
+ }
auto * self = static_cast<CurrentFabricRemover *>(context);
self->mNextStep = Step::kAcceptRemoveFabricStart;
if (self->mCurrentFabricRemoveCallback != nullptr)
--
2.45.2

Loading

0 comments on commit a126933

Please sign in to comment.