Skip to content

Commit 2c7c857

Browse files
committed
fix
1 parent 42d61ae commit 2c7c857

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

packages/helpermodules/command.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -734,19 +734,16 @@ def systemUpdate(self, connection_id: str, payload: dict) -> None:
734734
run_command([
735735
str(parent_file / "runs" / "update_self.sh"),
736736
SubData.system_data["system"].data["current_branch"]])
737-
try:
738-
if not SubData.general_data.data.extern and SubData.system_data["system"].data["secondary_auto_update"]:
739-
for cp in SubData.cp_data.values():
740-
# if chargepoint is external_openwb and not the second CP of duo and version is Release
741-
if (
742-
cp.chargepoint.chargepoint_module.config.type == 'external_openwb' and
743-
cp.chargepoint.chargepoint_module.config.configuration.duo_num == 0 and
744-
cp.chargepoint.chargepoint_module.get.version == "Release"
745-
):
746-
time.sleep(2)
747-
self.secondaryChargepointUpdate({"data": {"chargepoint": cp}})
748-
except Exception:
749-
log.error("Fehler im command Modul")
737+
if not SubData.general_data.data.extern and SubData.system_data["system"].data["secondary_auto_update"]:
738+
for cp in SubData.cp_data.values():
739+
# if chargepoint is external_openwb and not the second CP of duo and version is Release
740+
if (
741+
cp.chargepoint.chargepoint_module.config.type == 'external_openwb' and
742+
cp.chargepoint.chargepoint_module.config.configuration.duo_num == 0 and
743+
cp.chargepoint.data.get.current_branch == "Release"
744+
):
745+
time.sleep(2)
746+
self.secondaryChargepointUpdate({"data": {"chargepoint": f"cp{cp.chargepoint.num}"}})
750747

751748
def systemFetchVersions(self, connection_id: str, payload: dict) -> None:
752749
log.info("Fetch versions requested")

packages/helpermodules/update_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ class UpdateConfig:
544544
("openWB/system/ip_address", "unknown"),
545545
("openWB/system/mqtt/valid_partner_ids", []),
546546
("openWB/system/release_train", "master"),
547+
("openWB/system/secondary_auto_update", True),
547548
("openWB/system/serial_number", get_serial_number()),
548549
)
549550
invalid_topic = (

0 commit comments

Comments
 (0)