From c18112a61f63c5e1225c682e57728453ad8d715d Mon Sep 17 00:00:00 2001 From: Max Moroz Date: Sat, 29 Apr 2017 12:55:22 -0700 Subject: [PATCH] Fix bug in cache log --- mypy/waiter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/waiter.py b/mypy/waiter.py index 62a0555974c0..0f1759fefab8 100644 --- a/mypy/waiter.py +++ b/mypy/waiter.py @@ -339,7 +339,7 @@ def sort_function(cmd: LazySubprocess) -> Tuple[Any, int, float]: if self.new_log: # don't append empty log, it will corrupt the cache file # log only LOGSIZE most recent tests - test_log = (self.load_log_file() + [self.new_log])[:self.LOGSIZE] + test_log = (self.load_log_file() + [self.new_log])[-self.LOGSIZE:] try: with open(self.FULL_LOG_FILENAME, 'w') as fp: json.dump(test_log, fp, sort_keys=True, indent=4)