From 1f5229bf93bf9f733dd073fabbadde2d6dfbb7d6 Mon Sep 17 00:00:00 2001 From: saranyaloganathan23 Date: Fri, 30 Aug 2024 10:15:55 +0530 Subject: [PATCH] if else changes --- dataproc_jupyter_plugin/services/executor.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dataproc_jupyter_plugin/services/executor.py b/dataproc_jupyter_plugin/services/executor.py index b1ff0138..17a4c2ba 100644 --- a/dataproc_jupyter_plugin/services/executor.py +++ b/dataproc_jupyter_plugin/services/executor.py @@ -94,10 +94,7 @@ async def check_file_exists(self, bucket, file_path): raise ValueError("Bucket name cannot be empty") bucket_name = storage.Client().bucket(bucket) blob = bucket_name.blob(file_path) - if blob.exists(): - return True - else: - return False + return blob.exists() except Exception as error: self.log.exception(f"Error checking file: {error}") raise IOError(f"Error creating dag: {error}")