Skip to content

Commit

Permalink
fix: Delete profile in local folder after upload to server
Browse files Browse the repository at this point in the history
  • Loading branch information
rouille committed Aug 2, 2019
1 parent e0cb34a commit d9ea1ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions powersimdata/scenario/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ def prepare_mpc_file(self):
upload(self._ssh, file_name, const.LOCAL_DIR, self._tmp_dir,
change_name_to='case.mat')

print("Deleting %s on local machine" % file_name)
os.remove(os.path.join(const.LOCAL_DIR, file_name))

def prepare_profile(self, kind):
"""Prepares profile for simulation.
Expand Down Expand Up @@ -275,3 +278,6 @@ def _prepare_scaled_profile(self, kind):

upload(self._ssh, file_name, const.LOCAL_DIR, self._tmp_dir,
change_name_to='%s.csv' % kind)

print("Deleting %s on local machine" % file_name)
os.remove(os.path.join(const.LOCAL_DIR, file_name))

0 comments on commit d9ea1ee

Please sign in to comment.