aboutsummaryrefslogtreecommitdiffstats
path: root/app/discover/scan.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/discover/scan.py')
-rwxr-xr-xapp/discover/scan.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/discover/scan.py b/app/discover/scan.py
index 72184ec..86ee990 100755
--- a/app/discover/scan.py
+++ b/app/discover/scan.py
@@ -274,6 +274,7 @@ class ScanController(Fetcher):
# generate ScanObject Class and instance.
scanner = Scanner()
scanner.set_env(env_name)
+ scanner.found_errors[env_name] = False
# decide what scanning operations to do
inventory_only = scan_plan.inventory_only
@@ -313,7 +314,10 @@ class ScanController(Fetcher):
except ScanError as e:
return False, "scan error: " + str(e)
SshConnection.disconnect_all()
- return True, 'ok'
+ status = 'ok' if not scanner.found_errors.get(env_name, False) \
+ else 'errors detected'
+ self.log.info('Scan completed, status: {}'.format(status))
+ return True, status
if __name__ == '__main__':