Skip to content

Commit

Permalink
Merge pull request #23 from CIAT-DAPA/develop
Browse files Browse the repository at this point in the history
fixed small issue when removing tmp file
  • Loading branch information
andresk159 authored Aug 18, 2023
2 parents d296191 + a3ffaa4 commit 6540295
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/aclimate_cpt/01_prediccion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ def cpt_merge_x_files(file_paths):
elif platform.system() == "Linux":
os.system("chmod +x"+tmp_file)
os.system(tmp_file)
os.remove(tmp_file)

# Ejecución de CPT


Expand All @@ -1145,6 +1145,7 @@ def cpt_merge_x_files(file_paths):
#os.rename(tmp_file, merged_out_path)
os.remove(file_path_1)
os.remove(file_path_2)
os.remove(tmp_file)
status = "Success"
except subprocess.CalledProcessError:
status = "Failed: Error al ejecutar CPT_batch"
Expand Down
3 changes: 2 additions & 1 deletion src/aclimate_cpt/prediction_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ def cpt_merge_x_files(self, file_paths):
elif platform.system() == "Linux":
os.system("chmod +x"+tmp_file)
os.system(tmp_file)
os.remove(tmp_file)

# Ejecución de CPT


Expand All @@ -1144,6 +1144,7 @@ def cpt_merge_x_files(self, file_paths):
#os.rename(tmp_file, merged_out_path)
os.remove(file_path_1)
os.remove(file_path_2)
os.remove(tmp_file)
status = "Success"
except subprocess.CalledProcessError:
status = "Failed: Error al ejecutar CPT_batch"
Expand Down

0 comments on commit 6540295

Please sign in to comment.