Unverified Commit 0841d00f authored by Richard Berger's avatar Richard Berger
Browse files

Fix unclosed file warning

parent 644d65ea
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -188,9 +188,11 @@ class log:
    str_one = "Step "

    if filename[-3:] == ".gz":
      txt = gzip.open(filename, 'rt').read()
      with gzip.open(filename, 'rt') as f:
        txt = f.read()
    else:
      txt = open(filename, 'rt').read()
      with open(filename, 'rt') as f:
        txt = f.read()

    if txt.find(str_multi) >= 0:
      self.firststr = str_multi