Skip to content

Commit 8e98d6a

Browse files
authored
Merge pull request #840 from PGorzalka/issue838_weathercopy
catching error when weather data was already manually placed in output
2 parents 0ddb62c + 4b6d8bf commit 8e98d6a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

teaser/data/output/modelica_output.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,7 @@ def copy_weather_data(source_path, destination_path):
7676
destination_path : str
7777
path of where the weather file should be placed
7878
"""
79-
80-
shutil.copy2(source_path, destination_path)
79+
try:
80+
shutil.copy2(source_path, destination_path)
81+
except shutil.SameFileError:
82+
pass

0 commit comments

Comments
 (0)