File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1146,12 +1146,15 @@ def do_custom_build(self):
11461146 os .path .isfile (tarball_cache_path )):
11471147 if get_file_hash (tarball_cache_path ) == LOCAL_FREETYPE_HASH :
11481148 try :
1149- # fail on Lpy, oh well
1150- os .makedirs ('build' , exist_ok = True )
1149+ os .makedirs ('build' )
1150+ except OSError :
1151+ # Don't care if it exists.
1152+ pass
1153+ try :
11511154 shutil .copy (tarball_cache_path , tarball_path )
11521155 print ('Using cached tarball: {}'
11531156 .format (tarball_cache_path ))
1154- except :
1157+ except OSError :
11551158 # If this fails, oh well just re-download
11561159 pass
11571160
@@ -1186,12 +1189,15 @@ def do_custom_build(self):
11861189 raise IOError ("Failed to download freetype" )
11871190 if get_file_hash (tarball_path ) == LOCAL_FREETYPE_HASH :
11881191 try :
1189- # this will fail on LPy, oh well
1190- os .makedirs (tarball_cache_dir , exist_ok = True )
1192+ os .makedirs (tarball_cache_dir )
1193+ except OSError :
1194+ # Don't care if it exists.
1195+ pass
1196+ try :
11911197 shutil .copy (tarball_path , tarball_cache_path )
11921198 print ('Cached tarball at: {}'
11931199 .format (tarball_cache_path ))
1194- except :
1200+ except OSError :
11951201 # again, we do not care if this fails, can
11961202 # always re download
11971203 pass
You can’t perform that action at this time.
0 commit comments