update pickle file

This commit is contained in:
2019-07-14 00:24:03 +02:00
parent c3cd27261d
commit c1bb481cac
2 changed files with 21 additions and 5 deletions

View File

@ -7,3 +7,18 @@ import pickle
with open('registers.pkl', 'rb') as f:
datapoints = pickle.load(f)
RegisterDatapoint.checkRegisterList(datapoints, reset=True)
newDatapoints = []
for dp in datapoints:
ndp = type(dp)()
for k,v in dp.__dict__.items():
ndp.__dict__[k] = v
newDatapoints.append(ndp)
RegisterDatapoint.checkRegisterList(newDatapoints, reset=True)
with open('registers.pkl', 'wb') as f:
pickle.dump(newDatapoints, f)