From 1a5218231abca29a46a485b7fed4c7de552a11d1 Mon Sep 17 00:00:00 2001 From: Iarrondo <156789514+Iarrondo@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:33:05 +0100 Subject: [PATCH] Update articFileUtils.py to solve issue with creating file --- src/articFileUtils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/articFileUtils.py b/src/articFileUtils.py index e779131..015879c 100644 --- a/src/articFileUtils.py +++ b/src/articFileUtils.py @@ -24,6 +24,8 @@ def __init__(self, path, readIt = False): self.path = path if readIt: self.readFile() + else: + lines = [] def readFile(self): filePointer = open (self.path, "r") @@ -49,4 +51,4 @@ def modifyLine(self, lineNumber, line): self.lines[lineNumber] = line def lineCount(self): - return len(self.lines) \ No newline at end of file + return len(self.lines)