From acfc096a2841479fc9deab4444bd1b1d5baae17f Mon Sep 17 00:00:00 2001 From: Yousefnezhad Date: Wed, 11 Jun 2025 11:22:27 +0330 Subject: [PATCH] regexp Error --- plugins/modules/nfs_exports_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/nfs_exports_info.py b/plugins/modules/nfs_exports_info.py index 14de7a96a8..01e2ee7960 100644 --- a/plugins/modules/nfs_exports_info.py +++ b/plugins/modules/nfs_exports_info.py @@ -80,14 +80,14 @@ def get_exports(module, output_format, file_path="/etc/exports"): module.fail_json(msg="Could not read {}".format(file_path)) exports = {} - pattern = r'\s*(\S+)\s+(.+)' + pattern = re.compile(r'\s*(\S+)\s+(.+)') for line in output_lines: line = line.strip() if not line or line.startswith('#'): continue - match = re.match(pattern, line) + match = pattern.match(line) if not match: continue