You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/06 07:17:29 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #22772: Fail LocalFilesystemToGCSOperator if src does not exist

uranusjr commented on code in PR #22772:
URL: https://github.com/apache/airflow/pull/22772#discussion_r843555640


##########
airflow/providers/google/cloud/transfers/local_to_gcs.py:
##########
@@ -109,6 +109,8 @@ def execute(self, context: 'Context'):
         )
 
         filepaths = self.src if isinstance(self.src, list) else glob(self.src)
+        if len(filepaths) == 0:
+            raise ValueError(f"src {self.src} dos not exist.")

Review Comment:
   ```suggestion
           if not filepaths:
               raise FileNotFoundError(self.src)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org