Fix clearing old logs
Log handler wasn't detecting old files for deletion due to typo Fixes bug #1084667 Change-Id: I3c9b67e5ef353633a98ef70b41472ac240bb83be
This commit is contained in:
parent
953d235b99
commit
db34d6d0b6
@ -36,7 +36,7 @@ class CompressedTimedRotatingFileHandler(
|
||||
# Delete oldest log
|
||||
# TODO: clear multiple old logs
|
||||
if self.backupCount > 0:
|
||||
s = glob.glob('{0}.20'.format(self.baseFilename))
|
||||
s = glob.glob('{0}.20*'.format(self.baseFilename))
|
||||
if len(s) > self.backupCount:
|
||||
s.sort()
|
||||
os.remove(s[0])
|
||||
|
Loading…
x
Reference in New Issue
Block a user