mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-15 11:54:30 +02:00
Use raw string for regex
This commit is contained in:
parent
07f81b887e
commit
44fe6a626b
1 changed files with 1 additions and 1 deletions
|
@ -1581,7 +1581,7 @@ class MikrotikCoordinator(DataUpdateCoordinator[None]):
|
||||||
try:
|
try:
|
||||||
full_version = self.ds["fw-update"].get("installed-version")
|
full_version = self.ds["fw-update"].get("installed-version")
|
||||||
split_end = min(len(full_version),4)
|
split_end = min(len(full_version),4)
|
||||||
version = re.sub("[^0-9\.]", "", full_version[0:split_end])
|
version = re.sub(r"[^0-9\.]", "", full_version[0:split_end])
|
||||||
self.major_fw_version = int(version.split(".")[0])
|
self.major_fw_version = int(version.split(".")[0])
|
||||||
self.minor_fw_version = int(version.split(".")[1])
|
self.minor_fw_version = int(version.split(".")[1])
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue