Skip to content

Commit

Permalink
use legacy run in more modules
Browse files Browse the repository at this point in the history
  • Loading branch information
yankee42 committed Jan 10, 2022
1 parent 4af62f0 commit b29c062
Show file tree
Hide file tree
Showing 42 changed files with 72 additions and 115 deletions.
2 changes: 1 addition & 1 deletion modules/bezug_alphaess/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/alpha_ess/device.py "counter" "${alphav123}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.alpha_ess.device" "counter" "${alphav123}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
4 changes: 2 additions & 2 deletions modules/bezug_carlogavazzilan/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ else
MYLOGFILE="${RAMDISKDIR}/evu_carlo_gavazzi.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/carlo_gavazzi/device.py "counter" "${bezug1_ip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.carlo_gavazzi.device" "counter" "${bezug1_ip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"

wattbezug=$(<${RAMDISKDIR}/wattbezug)
echo $wattbezug
echo $wattbezug
2 changes: 1 addition & 1 deletion modules/bezug_ethmpm3pm/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/openwb/device.py "counter" "${evukitversion}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb.device" "counter" "${evukitversion}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_ethmpm3pmflex/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu_json.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/openwb_flex/device.py "counter" "${evuflexversion}" "${evuflexip}" "${evuflexport}" "${evuflexid}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb_flex.device" "counter" "${evuflexversion}" "${evuflexip}" "${evuflexport}" "${evuflexid}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
4 changes: 2 additions & 2 deletions modules/bezug_janitza/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ else
MYLOGFILE="${RAMDISKDIR}/evu_janitza.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/janitza/device.py "counter" "${bezug1_ip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.janitza.device" "counter" "${bezug1_ip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"

wattbezug=$(<${RAMDISKDIR}/wattbezug)
echo $wattbezug
echo $wattbezug
4 changes: 2 additions & 2 deletions modules/bezug_powerdog/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ else
MYLOGFILE="${RAMDISKDIR}/evu_powerdog.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/powerdog/device.py "counter" "${bezug1_ip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.powerdog.device" "counter" "${bezug1_ip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"

wattbezug=$(<${RAMDISKDIR}/wattbezug)
echo $wattbezug
echo $wattbezug
2 changes: 1 addition & 1 deletion modules/bezug_siemens/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/siemens/device.py "counter" "${bezug1_ip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.siemens.device" "counter" "${bezug1_ip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_solax/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/solax/device.py "counter" "${solaxip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.solax.device" "counter" "${solaxip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_victrongx/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/victron/device.py "counter" "${bezug_victronip}" "${bezug_id}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.victron.device" "counter" "${bezug_victronip}" "${bezug_id}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
4 changes: 2 additions & 2 deletions modules/speicher_alphaess/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ fi

openwbDebugLog ${DMOD} 2 "Speicher Version: ${alphav123}"

python3 $OPENWBBASEDIR/packages/modules/alpha_ess/device.py "bat" "${alphav123}" >>$MYLOGFILE 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.alpha_ess.device" "bat" "${alphav123}" >>$MYLOGFILE 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"

speicherleistung=$(<${RAMDISKDIR}/speicherleistung)

openwbDebugLog ${DMOD} 1 "BattLeistung: ${speicherleistung}"
openwbDebugLog ${DMOD} 1 "BattLeistung: ${speicherleistung}"
2 changes: 1 addition & 1 deletion modules/speicher_fronius/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi

openwbDebugLog ${DMOD} 2 "Speicher IP: ${wrfroniusip}"

python3 /var/www/html/openWB/packages/modules/fronius/device.py "bat" "${wrfroniusip}" "${froniuserzeugung}" "${wrfroniusisgen24}" "0" "0" "none" "" >>$MYLOGFILE 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.fronius.device" "bat" "${wrfroniusip}" "${froniuserzeugung}" "${wrfroniusisgen24}" "0" "0" "none" "" >>$MYLOGFILE 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/speicher_mpm3pm/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/bat.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/openwb/device.py "bat" "${speicherkitversion}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb.device" "bat" "${speicherkitversion}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "BAT RET: ${ret}"
2 changes: 1 addition & 1 deletion modules/speicher_saxpower/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/bat.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/saxpower/device.py "bat" "${speicher1_ip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.saxpower.device" "bat" "${speicher1_ip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "BAT RET: ${ret}"
2 changes: 1 addition & 1 deletion modules/speicher_siemens/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/bat.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/siemens/device.py "bat" "${speicher1_ip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.siemens.device" "bat" "${speicher1_ip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "BAT RET: ${ret}"
2 changes: 1 addition & 1 deletion modules/speicher_solax/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/bat.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/solax/device.py "bat" "${solaxip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.solax.device" "bat" "${solaxip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "BAT RET: ${ret}"
2 changes: 1 addition & 1 deletion modules/speicher_sunnyisland/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/bat.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/sunny_island/device.py "bat" "${sunnyislandip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.sunny_island.device" "bat" "${sunnyislandip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "BAT RET: ${ret}"
2 changes: 1 addition & 1 deletion modules/speicher_victron/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
MYLOGFILE="${RAMDISKDIR}/bat.log"
fi

python3 ${OPENWBBASEDIR}/packages/modules/victron/device.py "bat" "${bezug_victronip}" >>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.victron.device" "bat" "${bezug_victronip}" >>${MYLOGFILE} 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "BAT RET: ${ret}"
2 changes: 1 addition & 1 deletion modules/wr2_ethlovato/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fi

#python3 ${OPENWBBASEDIR}/modules/wr_pvkitflex/test.py "2" ${pvflexip} ${pvflexport} ${pvflexid} >>${MYLOGFILE} 2>&1

python3 ${OPENWBBASEDIR}/packages/modules/openwb/device.py "inverter" "${pvkitversion}" "2">>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb.device" "inverter" "${pvkitversion}" "2">>${MYLOGFILE} 2>&1

pvwatt=$(<${RAMDISKDIR}/pv2watt)
echo $pvwatt
2 changes: 1 addition & 1 deletion modules/wr2_pvkitflex/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ openwbDebugLog ${DMOD} 2 "PV ID : ${pv2flexid}"

#python3 ${OPENWBBASEDIR}/modules/wr_pvkitflex/test.py "2" ${pv2flexip} ${pv2flexport} ${pv2flexid} >>${MYLOGFILE} 2>&1

python3 ${OPENWBBASEDIR}/packages/modules/openwb_flex/device.py "inverter" "${pv2flexversion}" "${pv2flexip}" "${pv2flexport}" "${pv2flexid}" "2">>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb_flex.device" "inverter" "${pv2flexversion}" "${pv2flexip}" "${pv2flexport}" "${pv2flexid}" "2">>${MYLOGFILE} 2>&1

pvwatt=$(<${RAMDISKDIR}/pv2watt)
echo $pvwatt
2 changes: 1 addition & 1 deletion modules/wr2_solax/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
openwbDebugLog ${DMOD} 2 "PV2 IP: ${pv2ip}"


python3 ${OPENWBBASEDIR}/packages/modules/solax/device.py "inverter" "${pv2ip}" "2">>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.solax.device" "inverter" "${pv2ip}" "2">>${MYLOGFILE} 2>&1

pvwatt=$(<${RAMDISKDIR}/pvwatt)
echo $pvwatt
2 changes: 1 addition & 1 deletion modules/wr2_victron/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else
fi


python3 ${OPENWBBASEDIR}/packages/modules/victron/device.py "inverter" "${pv2ip}" "${pv2id}" "1" "2">>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.victron.device" "inverter" "${pv2ip}" "${pv2id}" "1" "2">>${MYLOGFILE} 2>&1

pvwatt=$(<${RAMDISKDIR}/pvwatt)
echo $pvwatt
2 changes: 1 addition & 1 deletion modules/wr_alphaess/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi

openwbDebugLog ${DMOD} 2 "Speicher Version: ${alphav123}"

python3 $OPENWBBASEDIR/packages/modules/alpha_ess/device.py "inverter" "${alphav123}" "1">>$MYLOGFILE 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.alpha_ess.device" "inverter" "${alphav123}" "1">>$MYLOGFILE 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/wr_powerdog/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi

openwbDebugLog ${DMOD} 2 "powerdog ip: ${bezug1_ip}"

python3 $OPENWBBASEDIR/packages/modules/powerdog/device.py "inverter" "${bezug1_ip}" "1">>$MYLOGFILE 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.powerdog.device" "inverter" "${bezug1_ip}" "1">>$MYLOGFILE 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/wr_pvkit/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else
fi


python3 ${OPENWBBASEDIR}/packages/modules/openwb/device.py "inverter" "${pvkitversion}" "1">>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb.device" "inverter" "${pvkitversion}" "1">>${MYLOGFILE} 2>&1

pvwatt=$(<${RAMDISKDIR}/pvwatt)
echo $pvwatt
2 changes: 1 addition & 1 deletion modules/wr_pvkitflex/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ openwbDebugLog ${DMOD} 2 "PV ID : ${pvflexid}"

#python3 ${OPENWBBASEDIR}/modules/wr_pvkitflex/test.py "1" ${pvflexip} ${pvflexport} ${pvflexid} >>${MYLOGFILE} 2>&1

python3 ${OPENWBBASEDIR}/packages/modules/openwb_flex/device.py "inverter" "${pvflexversion}" "${pvflexip}" "${pvflexport}" "${pvflexid}" "1">>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb_flex.device" "inverter" "${pvflexversion}" "${pvflexip}" "${pvflexport}" "${pvflexid}" "1">>${MYLOGFILE} 2>&1

pvwatt=$(<${RAMDISKDIR}/pvwatt)
echo $pvwatt
4 changes: 2 additions & 2 deletions modules/wr_siemens/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else
fi


python3 ${OPENWBBASEDIR}/packages/modules/siemens/device.py "inverter" "${pv1_ipa}" "1">>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.siemens.device" "inverter" "${pv1_ipa}" "1">>${MYLOGFILE} 2>&1

pvwatt=$(<${RAMDISKDIR}/pvwatt)
echo $pvwatt
echo $pvwatt
2 changes: 1 addition & 1 deletion modules/wr_solax/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
openwbDebugLog ${DMOD} 2 "PV IP: ${solaxip}"


python3 ${OPENWBBASEDIR}/packages/modules/solax/device.py "inverter" "${solaxip}" "1">>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.solax.device" "inverter" "${solaxip}" "1">>${MYLOGFILE} 2>&1

pvwatt=$(<${RAMDISKDIR}/pvwatt)
echo $pvwatt
4 changes: 2 additions & 2 deletions modules/wr_sunways/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ fi
openwbDebugLog ${DMOD} 2 "PV IP: ${wrsunwaysip}"
openwbDebugLog ${DMOD} 2 "PV Passwort: ${wrsunwayspw}"

python3 /var/www/html/openWB/packages/modules/sunways/device.py "inverter" "${wrsunwaysip}" "${wrsunwayspw}" "1">>$MYLOGFILE 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.sunways.device" "inverter" "${wrsunwaysip}" "${wrsunwayspw}" "1">>$MYLOGFILE 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"

pvwatt=$(</var/www/html/openWB/ramdisk/pvwatt)
echo $pvwatt
echo $pvwatt
2 changes: 1 addition & 1 deletion modules/wr_victron/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else
fi


python3 ${OPENWBBASEDIR}/packages/modules/victron/device.py "inverter" "${pv1_ipa}" "100" "0" "1">>${MYLOGFILE} 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.victron.device" "inverter" "${pv1_ipa}" "100" "0" "1">>${MYLOGFILE} 2>&1

pvwatt=$(<${RAMDISKDIR}/pvwatt)
echo $pvwatt
9 changes: 3 additions & 6 deletions packages/modules/alpha_ess/device.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
""" Modul zum Auslesen von Alpha Ess Speichern, Zählern und Wechselrichtern.
"""
from typing import Dict, Union, Optional
from typing import Dict, Union, Optional, List

from helpermodules import log
from helpermodules.cli import run_using_positional_cli_args
Expand Down Expand Up @@ -88,8 +88,5 @@ def read_legacy(component_type: str, version: int, num: Optional[int]) -> None:
dev.update()


if __name__ == "__main__":
try:
run_using_positional_cli_args(read_legacy)
except Exception:
log.MainLogger().exception("Fehler im Alpha Ess Skript")
def main(argv: List[str]):
run_using_positional_cli_args(read_legacy, argv)
9 changes: 3 additions & 6 deletions packages/modules/carlo_gavazzi/device.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
from typing import Dict, Optional
from typing import Dict, Optional, List

from helpermodules import log
from helpermodules.cli import run_using_positional_cli_args
Expand Down Expand Up @@ -82,8 +82,5 @@ def read_legacy(component_type: str, ip_address: str, num: Optional[int]) -> Non
dev.update()


if __name__ == "__main__":
try:
run_using_positional_cli_args(read_legacy)
except Exception:
log.MainLogger().exception("Fehler im Carlo Gavazzi Skript")
def main(argv: List[str]):
run_using_positional_cli_args(read_legacy, argv)
9 changes: 1 addition & 8 deletions packages/modules/fronius/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from modules.common.abstract_device import AbstractDevice
from modules.common.component_context import MultiComponentUpdateContext
from modules.fronius import bat
from modules.fronius import counter_sm
from modules.fronius import counter_s0
from modules.fronius import counter_sm
from modules.fronius import inverter
from modules.fronius import meter

Expand Down Expand Up @@ -147,10 +147,3 @@ def read_legacy(

def main(argv: List[str]) -> None:
run_using_positional_cli_args(read_legacy, argv)


if __name__ == "__main__":
try:
run_using_positional_cli_args(read_legacy)
except Exception:
log.MainLogger().exception("Fehler im Fronius Skript")
9 changes: 3 additions & 6 deletions packages/modules/janitza/device.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
from typing import Dict, Optional
from typing import Dict, Optional, List

from helpermodules import log
from helpermodules.cli import run_using_positional_cli_args
Expand Down Expand Up @@ -82,8 +82,5 @@ def read_legacy(component_type: str, ip_address: str, num: Optional[int]) -> Non
dev.update()


if __name__ == "__main__":
try:
run_using_positional_cli_args(read_legacy)
except Exception:
log.MainLogger().exception("Fehler im Janitza Skript")
def main(argv: List[str]):
run_using_positional_cli_args(read_legacy, argv)
9 changes: 3 additions & 6 deletions packages/modules/openwb/device.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, Union, Optional
from typing import Dict, Union, Optional, List

from helpermodules import log
from helpermodules.cli import run_using_positional_cli_args
Expand Down Expand Up @@ -79,8 +79,5 @@ def read_legacy(component_type: str, version: int, num: Optional[int]):
dev.update()


if __name__ == "__main__":
try:
run_using_positional_cli_args(read_legacy)
except Exception:
log.MainLogger().exception("Fehler im Modul openwb")
def main(argv: List[str]):
run_using_positional_cli_args(read_legacy, argv)
9 changes: 3 additions & 6 deletions packages/modules/openwb_flex/device.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, Union, Optional
from typing import Dict, Union, Optional, List

from helpermodules import log
from helpermodules.cli import run_using_positional_cli_args
Expand Down Expand Up @@ -98,8 +98,5 @@ def read_legacy(component_type: str, version: int, ip_address: str, port: int, i
dev.update()


if __name__ == "__main__":
try:
run_using_positional_cli_args(read_legacy)
except Exception:
log.MainLogger().exception("Fehler im Modul openwb_flex")
def main(argv: List[str]):
run_using_positional_cli_args(read_legacy, argv)
Loading

0 comments on commit b29c062

Please sign in to comment.