Skip to content

Commit 5bf17b7

Browse files
authored
Merge pull request #287 from gudnimg/db-cleanup-ltspice
Cleanup `.db` files when using LTspice 24.1.9 and newer
2 parents 1881a38 + 903f31f commit 5bf17b7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,8 @@ For support and improvement requests please open an Issue
11301130
in [GitHub spicelib issues](https://github.com/nunobrum/spicelib/issues)
11311131

11321132
## History
1133+
* Version x.x.x (unreleased)
1134+
* Fixing issue when using LTspice where `.db` files were not cleaned up after a simulation completes.
11331135
* Version 1.4.9
11341136
* Adopting clipin for clipboard operations
11351137
* Adding dialect support to raw_convert

spicelib/sim/sim_runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,11 +794,11 @@ def cleanup_files(self):
794794

795795
if netlistfile.suffix == '.net' or netlistfile.suffix == '.asc':
796796
# Delete the files that have been potentially created by LTSpice
797-
for ext in ('.log.raw', '.op.raw'):
797+
for ext in ('.log.raw', '.op.raw', '.db'):
798798
self._del_file_ext_if_exists(netlistfile, ext)
799799

800-
if netlistfile.suffix == '.asc': # If simulated from an asc file, delete the .net file
801-
# Then needs to delete the .net as well
800+
if netlistfile.suffix == '.asc':
801+
# If simulated from an asc file, delete the .net file
802802
self._del_file_ext_if_exists(netlistfile, '.net')
803803

804804
def file_cleanup(self):

0 commit comments

Comments
 (0)