Fixed file close for source code text

This commit is contained in:
leyghisbb 2020-08-30 11:17:54 +02:00
parent 7b5e689728
commit b7d3235e80

View File

@ -27,9 +27,8 @@ class MyEffect(inkex.Effect):
for path in matched_files: for path in matched_files:
file = open(path) file = open(path)
for word in file.read().split(): for word in file.read().split():
file.close()
yield word yield word
file.close()
def add_text(self, node): def add_text(self, node):
#Add the text to the node #Add the text to the node
word_generator = self.text_generation() word_generator = self.text_generation()