@@ -3268,9 +3268,6 @@ def execute(self):
32683268 annotations ,
32693269 fuse_image ,
32703270 )
3271- logger .info (
3272- "Downloaded image %s to %s." , self ._image .name , str (download_path )
3273- )
32743271
32753272 return self ._response
32763273
@@ -4067,6 +4064,8 @@ def download_to_local_storage(self, destination: str):
40674064 project_id = self ._project .uuid ,
40684065 export_id = export ["id" ],
40694066 )
4067+ if "error" in export :
4068+ raise AppException (export ["error" ])
40704069 export_status = export ["status" ]
40714070 if export_status in (ExportStatus .ERROR .value , ExportStatus .CANCELED .value ):
40724071 raise AppException ("Couldn't download export." )
@@ -4877,7 +4876,7 @@ def _upload_image(self, image_path: str):
48774876 else :
48784877 try :
48794878 image_bytes = io .BytesIO (open (image_path , "rb" ).read ())
4880- except FileNotFoundError :
4879+ except OSError :
48814880 return ProcessedImage (
48824881 uploaded = False ,
48834882 path = image_path ,
@@ -4927,10 +4926,6 @@ def images_to_upload(self):
49274926 [extension in path for extension in self .exclude_file_patterns ]
49284927 )
49294928 ]
4930- excluded_paths = [path for path in paths if path not in filtered_paths ]
4931- if excluded_paths :
4932- logger .info (f"Excluded paths { ', ' .join (excluded_paths )} " )
4933-
49344929 image_entities = (
49354930 GetBulkImages (
49364931 service = self ._backend_client ,
@@ -4994,8 +4989,6 @@ def execute(self):
49944989 duplications .extend (attach_duplications )
49954990 uploaded = [image ["name" ] for image in uploaded ]
49964991 failed_images = [image .split ("/" )[- 1 ] for image in failed_images ]
4997- if duplications :
4998- logger .info (f"Duplicated images { ', ' .join (duplications )} " )
49994992 self ._response .data = uploaded , failed_images , duplications
50004993 return self ._response
50014994
0 commit comments