From 3834e9fd3fd81d995f967b6d0fccbc65eaff76a9 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Tue, 20 Oct 2020 12:43:02 +0200 Subject: [PATCH] unused vars in exception --- plugins/modules/data_pipeline.py | 2 +- plugins/modules/s3_lifecycle.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/modules/data_pipeline.py b/plugins/modules/data_pipeline.py index 5811b35066b..b596b381e7e 100644 --- a/plugins/modules/data_pipeline.py +++ b/plugins/modules/data_pipeline.py @@ -255,7 +255,7 @@ def pipeline_description(client, dp_id): """ try: return client.describe_pipelines(pipelineIds=[dp_id]) - except ClientError as e: + except ClientError: raise DataPipelineNotFound diff --git a/plugins/modules/s3_lifecycle.py b/plugins/modules/s3_lifecycle.py index 53395ed4f47..3012319b415 100644 --- a/plugins/modules/s3_lifecycle.py +++ b/plugins/modules/s3_lifecycle.py @@ -477,13 +477,13 @@ def main(): if expiration_date is not None: try: datetime.datetime.strptime(expiration_date, "%Y-%m-%dT%H:%M:%S.000Z") - except ValueError as e: + except ValueError: module.fail_json(msg="expiration_date is not a valid ISO-8601 format. The time must be midnight and a timezone of GMT must be included") if transition_date is not None: try: datetime.datetime.strptime(transition_date, "%Y-%m-%dT%H:%M:%S.000Z") - except ValueError as e: + except ValueError: module.fail_json(msg="expiration_date is not a valid ISO-8601 format. The time must be midnight and a timezone of GMT must be included") if state == 'present':