Skip to content

Commit

Permalink
small changes we know that its changing in the internakl data holder
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav-Ban22 committed Oct 3, 2022
1 parent 604964c commit f1a1e0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,12 @@ def reload(self, newData):
lList = file.readlines()
for index, key in enumerate(newData.sections):
for indexo, keyo in enumerate(self.data.sections):
if key != keyo and index == indexo:
lList[index] = (" " * newData.levels[index]) + key[0] + ": " + str(key[1]) +"\n"
if key != keyo and int(index) == int(indexo):
lList[index] = (" " * newData.levels[index]) + key[0] + ": " + str(key[1]) + "\n"

with open(self.pathe, "w") as f:
f.writelines(lList)

file.close()

self.data = newData
Expand Down

0 comments on commit f1a1e0b

Please sign in to comment.