Skip to content

Commit

Permalink
Remove existing CSV file if user answers yes.
Browse files Browse the repository at this point in the history
  • Loading branch information
serialphotog committed Nov 14, 2018
1 parent 5490ad5 commit 213d9de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gpx2csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def convertGPX(gpx_path, csv_path, overwriteCSV=False):
logger.error(gpx_path + " does not exis.encode('utf-8')t. Exiting...")
sys.exit() # Nothing to work with!

if os.path.isfile(csv_path):
os.remove(csv_path)

# Get the waypoints from the GPX file
waypoints = parseGPX(gpx_path)

Expand Down

0 comments on commit 213d9de

Please sign in to comment.