fix matching of CLI output against regexp list 03/40003/1
authoryayogev <yaronyogev@gmail.com>
Wed, 23 Aug 2017 13:56:15 +0000 (16:56 +0300)
committeryayogev <yaronyogev@gmail.com>
Wed, 23 Aug 2017 13:56:15 +0000 (16:56 +0300)
Change-Id: Iadc2eb1bc7763e759946f31ddf333ee83d84ac70
Signed-off-by: yayogev <yaronyogev@gmail.com>
app/discover/fetchers/cli/cli_access.py

index 11579bd..24f2975 100644 (file)
@@ -202,6 +202,6 @@ class CliAccess(BinaryConverter, Fetcher):
             regex = regexp_tuple['re']
             regex = re.compile(regex)
             matches = regex.search(line)
-            if matches:
+            if matches and name not in o:
                 o[name] = matches.group(1)
                 break