Skip to content

Commit bef64fd

Browse files
committed
Minor fix to allow other cache-closing format
1 parent c06b537 commit bef64fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel_tuner/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ def correct_open_cache(cache, open_cache=True):
11961196
filestr = cachefile.read().strip()
11971197

11981198
# if file was not properly closed, pretend it was properly closed
1199-
if len(filestr) > 0 and not filestr[-3:] == "}\n}":
1199+
if len(filestr) > 0 and not filestr[-3:] in ["}\n}", "}}}"]:
12001200
# remove the trailing comma if any, and append closing brackets
12011201
if filestr[-1] == ",":
12021202
filestr = filestr[:-1]

0 commit comments

Comments
 (0)