Skip to content

Commit

Permalink
Delete any existing output files before running Eagle.
Browse files Browse the repository at this point in the history
  • Loading branch information
avian2 committed Jan 23, 2012
1 parent a10a2a8 commit 8f562a8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eagle_automation/export.py
Expand Up @@ -21,6 +21,14 @@ def export(self, in_path, layers, out_paths):

script.close()

for out_path in out_paths:
# to stop Eagle trowing up dialogs that
# files already exist
try:
os.unlink(out_path)
except OSError:
pass

cmd = [EAGLE, "-S" + script_path, in_path]
subprocess.call(cmd)

Expand Down

0 comments on commit 8f562a8

Please sign in to comment.