#NEWLINE# def make_permanent( self ) : #NEWLINE# #INDENT# 'Move the tile file to its permanent location.' #NEWLINE# source_dir = os . path . abspath ( os . path . dirname ( self . temp_tile_output_path ) ) #NEWLINE# dest_dir = os . path . abspath ( os . path . dirname ( self . tile_output_path ) ) #NEWLINE# create_directory ( dest_dir ) #NEWLINE# if self . nc_tile_output_path : #NEWLINE# #INDENT# vrt_file = open ( self . temp_tile_output_path , 'r' ) #NEWLINE# vrt_string = vrt_file . read ( ) #NEWLINE# vrt_file . close ( ) #NEWLINE# vrt_string = vrt_string . replace ( source_dir , dest_dir ) #NEWLINE# vrt_file = open ( self . tile_output_path , 'w' ) #NEWLINE# vrt_file . write ( vrt_string ) #NEWLINE# vrt_file . close ( ) #NEWLINE# shutil . move ( self . nc_temp_tile_output_path , source_dir . nc_tile_output_path ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# shutil . move ( self . temp_tile_output_path , self . tile_output_path )