A bunch of error messages converted to python3 syntax

This commit is contained in:
VakarisZ 2019-10-15 18:18:46 +03:00
parent 90f885f522
commit 559e12c1fb
4 changed files with 5 additions and 5 deletions

View File

@ -84,5 +84,5 @@ class AwsService(object):
filtered_instances_data = filter_instance_data_from_aws_response(response)
return filtered_instances_data
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

View File

@ -48,7 +48,7 @@ class WmiTools(object):
except Exception as exc:
dcom.disconnect()
if "rpc_s_access_denied" == exc.message:
if "rpc_s_access_denied" == exc:
raise AccessDeniedException(host, username, password, domain)
raise

View File

@ -107,10 +107,10 @@ class AWSExporter(Exporter):
else:
return False
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
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
@staticmethod

View File

@ -30,4 +30,4 @@ class ReportExporterManager(object, metaclass=Singleton):
try:
exporter().handle_report(report)
except Exception as e:
logger.exception('Failed to export report, error: ' + e.message)
logger.exception('Failed to export report, error: ' + e)