From 1e2f7dc0605f810e82268b9beb1d1d34d931f6ff Mon Sep 17 00:00:00 2001 From: yuyan0428 Date: Tue, 17 Jan 2023 08:43:49 +0000 Subject: [PATCH] Signed-off-by: yuyan0428 Signed-off-by: yuyan0428 --- aw/python/distributed/distribute/distribute.py | 4 ++-- src/core/command/distribute_utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aw/python/distributed/distribute/distribute.py b/aw/python/distributed/distribute/distribute.py index 06be095..37f7f2a 100755 --- a/aw/python/distributed/distribute/distribute.py +++ b/aw/python/distributed/distribute/distribute.py @@ -220,7 +220,7 @@ class Distribute: if len(isemulator) != 0: ipaddress = re.findall(r"\b10\.0\.2\.[0-9]{1,3}\b", output) else: - ip_template = r"\b192\.168\.(?:[0-9]{1,3}\.)[0-9]{1,3}\b" + ip_template = r"\b1[0-9]{1,2}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\b" ipaddress = re.findall(ip_template, output) if len(ipaddress) == 0: @@ -242,7 +242,7 @@ class Distribute: if 0 != len(isemulator): ipaddress = re.findall(r"\b10\.0\.2\.[0-9]{1,3}\b", output) else: - ip_template = r"\b192\.168\.(?:[0-9]{1,3}\.)[0-9]{1,3}\b" + ip_template = r"\b1[0-9]{1,2}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\b" ipaddress = re.findall(ip_template, output) if len(ipaddress) == 0: return "" diff --git a/src/core/command/distribute_utils.py b/src/core/command/distribute_utils.py index 8e26413..ffd1679 100755 --- a/src/core/command/distribute_utils.py +++ b/src/core/command/distribute_utils.py @@ -128,7 +128,7 @@ def query_device_ip(device): if 0 != len(isemulator): ipaddress = re.findall(r"\b10\.0\.2\.[0-9]{1,3}\b", output) else: - ip_template = r"\b192\.168\.(?:[0-9]{1,3}\.)[0-9]{1,3}\b" + ip_template = r"\b1[0-9]{1,2}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\b" ipaddress = re.findall(ip_template, output) if len(ipaddress) == 0: LOG.error("get device_%s ip fail,please check the net" -- Gitee