@@ -752,11 +752,12 @@ def store_build_artifacts(
752
752
"""
753
753
if settings .RTD_BUILD_MEDIA_STORAGE :
754
754
log .info (
755
- LOG_TEMPLATE .format (
756
- project = self .version .project .slug ,
757
- version = self .version .slug ,
758
- msg = 'Writing build artifacts to media storage' ,
759
- ),
755
+ LOG_TEMPLATE ,
756
+ {
757
+ 'project' : self .version .project .slug ,
758
+ 'version' : self .version .slug ,
759
+ 'msg' : 'Writing build artifacts to media storage' ,
760
+ },
760
761
)
761
762
762
763
storage = get_storage_class (settings .RTD_BUILD_MEDIA_STORAGE )()
@@ -798,23 +799,25 @@ def store_build_artifacts(
798
799
include_file = False ,
799
800
)
800
801
log .info (
801
- LOG_TEMPLATE .format (
802
- project = self .version .project .slug ,
803
- version = self .version .slug ,
804
- msg = f'Writing { media_type } to media storage - { to_path } ' ,
805
- ),
802
+ LOG_TEMPLATE ,
803
+ {
804
+ 'project' : self .version .project .slug ,
805
+ 'version' : self .version .slug ,
806
+ 'msg' : f'Writing { media_type } to media storage - { to_path } ' ,
807
+ },
806
808
)
807
809
try :
808
810
storage .copy_directory (from_path , to_path )
809
811
except Exception :
810
812
# Ideally this should just be an IOError
811
813
# but some storage backends unfortunately throw other errors
812
814
log .exception (
813
- LOG_TEMPLATE .format (
814
- project = self .version .project .slug ,
815
- version = self .version .slug ,
816
- msg = f'Error copying { from_path } to storage (not failing build)' ,
817
- ),
815
+ LOG_TEMPLATE ,
816
+ {
817
+ 'project' : self .version .project .slug ,
818
+ 'version' : self .version .slug ,
819
+ 'msg' : f'Error copying { from_path } to storage (not failing build)' ,
820
+ },
818
821
)
819
822
820
823
for media_type in types_to_delete :
@@ -824,23 +827,25 @@ def store_build_artifacts(
824
827
include_file = False ,
825
828
)
826
829
log .info (
827
- LOG_TEMPLATE .format (
828
- project = self .version .project .slug ,
829
- version = self .version .slug ,
830
- msg = f'Deleting { media_type } from media storage - { media_path } ' ,
831
- ),
830
+ LOG_TEMPLATE ,
831
+ {
832
+ 'project' : self .version .project .slug ,
833
+ 'version' : self .version .slug ,
834
+ 'msg' : f'Deleting { media_type } from media storage - { media_path } ' ,
835
+ },
832
836
)
833
837
try :
834
838
storage .delete_directory (media_path )
835
839
except Exception :
836
840
# Ideally this should just be an IOError
837
841
# but some storage backends unfortunately throw other errors
838
842
log .exception (
839
- LOG_TEMPLATE .format (
840
- project = self .version .project .slug ,
841
- version = self .version .slug ,
842
- msg = f'Error deleting { media_path } from storage (not failing build)' ,
843
- ),
843
+ LOG_TEMPLATE ,
844
+ {
845
+ 'project' : self .version .project .slug ,
846
+ 'version' : self .version .slug ,
847
+ 'msg' : f'Error deleting { media_path } from storage (not failing build)' ,
848
+ },
844
849
)
845
850
846
851
def update_app_instances (
0 commit comments