From 82180283c8c12748478633456e247bfcb3b933d7 Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Sat, 30 Jan 2021 23:03:45 -0800 Subject: [PATCH] Fixed log rotate --- src/py/bbctrl/Log.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/py/bbctrl/Log.py b/src/py/bbctrl/Log.py index ee227d8..5870f3d 100644 --- a/src/py/bbctrl/Log.py +++ b/src/py/bbctrl/Log.py @@ -180,6 +180,6 @@ class Log(object): if os.path.exists(fullpath): if n == 16: os.unlink(fullpath) - else: self._rotate(path, nextN) - - os.rename(fullpath, '%s.%d' % (path, nextN)) + else: + self._rotate(path, nextN) + os.rename(fullpath, '%s.%d' % (path, nextN)) -- 2.27.0