Commit 0f016165 authored by Wouter Kessels's avatar Wouter Kessels

Save results with .pkl extension

parent 9f07ef3a
......@@ -176,6 +176,8 @@ def save_results(source, name, description, rm_temp_name):
# TODO: implement a way to always include the initial positions of all bodies (including the asteroids)
# Check whether new file path is unique
if name[-4:] != ".pkl":
name += ".pkl"
if os.path.isfile(name):
raise ValueError("File path {} already exists. Define a unique file name".format(name))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment