From e9554e5da28d7e7671de915597b6b5f9b3a97625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Wir=C3=A9n?= Date: Sun, 22 Sep 2013 14:05:22 +0200 Subject: [PATCH] Fixed setup module to no longer break on OpenBSD release versions. --- library/system/setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/system/setup b/library/system/setup index 6b5a53e4f62..2a127590faf 100755 --- a/library/system/setup +++ b/library/system/setup @@ -273,9 +273,9 @@ class Facts(object): self.facts['distribution'] = 'OpenBSD' self.facts['distribution_release'] = platform.release() rc, out, err = module.run_command("/sbin/sysctl -n kern.version") - data = re.search('OpenBSD\s[0-9]+.[0-9]+(-\S+)?\s.*', out) - if data: - self.facts['distribution_version'] = data.groups()[0][1:] + match = re.match('OpenBSD\s[0-9]+.[0-9]+-(\S+)\s.*', out) + if match: + self.facts['distribution_version'] = match.groups()[0] else: self.facts['distribution_version'] = 'release' else: