Bugfix, add AWS exporter only when running with AWS config.

This commit is contained in:
Daniel Goldberg 2019-09-05 19:45:58 +03:00
parent 72cae8624c
commit 004cfa17f3
1 changed files with 2 additions and 2 deletions

View File

@ -3,14 +3,14 @@ import logging
from cc.services.reporting.report_exporter_manager import ReportExporterManager
from cc.services.reporting.aws_exporter import AWSExporter
from monkey_island.cc.services.remote_run_aws import RemoteRunAwsService
from monkey_island.cc.environment.environment import env
logger = logging.getLogger(__name__)
def populate_exporter_list():
manager = ReportExporterManager()
RemoteRunAwsService.init()
if RemoteRunAwsService.is_running_on_aws():
if RemoteRunAwsService.is_running_on_aws() and ('aws' == env.get_deployment()):
manager.add_exporter_to_list(AWSExporter)
if len(manager.get_exporters_list()) != 0: