forked from p15670423/monkey
A bunch of error messages converted to python3 syntax
This commit is contained in:
parent
90f885f522
commit
559e12c1fb
|
@ -84,5 +84,5 @@ class AwsService(object):
|
||||||
filtered_instances_data = filter_instance_data_from_aws_response(response)
|
filtered_instances_data = filter_instance_data_from_aws_response(response)
|
||||||
return filtered_instances_data
|
return filtered_instances_data
|
||||||
except botocore.exceptions.ClientError as e:
|
except botocore.exceptions.ClientError as e:
|
||||||
logger.warning("AWS client error while trying to get instances: " + e.message)
|
logger.warning("AWS client error while trying to get instances: " + e)
|
||||||
raise e
|
raise e
|
||||||
|
|
|
@ -48,7 +48,7 @@ class WmiTools(object):
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
dcom.disconnect()
|
dcom.disconnect()
|
||||||
|
|
||||||
if "rpc_s_access_denied" == exc.message:
|
if "rpc_s_access_denied" == exc:
|
||||||
raise AccessDeniedException(host, username, password, domain)
|
raise AccessDeniedException(host, username, password, domain)
|
||||||
|
|
||||||
raise
|
raise
|
||||||
|
|
|
@ -107,10 +107,10 @@ class AWSExporter(Exporter):
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
except UnknownServiceError as e:
|
except UnknownServiceError as e:
|
||||||
logger.warning('AWS exporter called but AWS-CLI securityhub service is not installed. Error: ' + e.message)
|
logger.warning('AWS exporter called but AWS-CLI securityhub service is not installed. Error: ' + e)
|
||||||
return False
|
return False
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception('AWS security hub findings failed to send. Error: ' + e.message)
|
logger.exception('AWS security hub findings failed to send. Error: ' + e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -30,4 +30,4 @@ class ReportExporterManager(object, metaclass=Singleton):
|
||||||
try:
|
try:
|
||||||
exporter().handle_report(report)
|
exporter().handle_report(report)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception('Failed to export report, error: ' + e.message)
|
logger.exception('Failed to export report, error: ' + e)
|
||||||
|
|
Loading…
Reference in New Issue