Skip to content

Commit

Permalink
optimize file save
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Jun 15, 2019
1 parent 92585de commit ffd654f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions helpAbout.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

versionMajor = 1
versionMinor = 2
versionDev = 1
date = "2019.6.14"
versionDev = 2
date = "2019.6.15"

def strAbout():
pathDirList = sys.argv[0].replace("\\", "/").split("/")
Expand Down
8 changes: 7 additions & 1 deletion paremeters_save.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import translation, parameters
from translation import tr_en
import json
import json, os


class ParametersToSave:
Expand All @@ -20,6 +20,12 @@ def __del__(self):

def save(self, path):
data = {}
rm = []
for f in self.files:
if f[0]=="" or not os.path.exists(f[0]):
rm.append(f)
for f in rm:
self.files.remove(f)
data["files"] = self.files
data["board"] = self.board
data["burn_pos"] = self.burnPosition
Expand Down

0 comments on commit ffd654f

Please sign in to comment.