Update regex to match different formats of host build string in demsg. (#1133)

This commit is contained in:
LiliDeng 2020-12-18 23:35:02 +08:00 коммит произвёл Chi Song
Родитель 2b14e90272
Коммит e9b140e4af
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -296,7 +296,11 @@ class AzurePlatformSchema:
self.locations = LOCATIONS
HOST_VERSION_PATTERN = re.compile(r"Hyper-V Host Build:([^\n;]*)")
# Ubuntu 18.04:
# [ 0.000000] Hyper-V Host Build:18362-10.0-3-0.3198
# FreeBSD 11.3:
# Hyper-V Version: 10.0.18362 [SP3]
HOST_VERSION_PATTERN = re.compile(r"Hyper-V (?:Host Build|Version): ?(.*)$", re.M)
def _get_node_information(node: Node, information: Dict[str, str]) -> None: