From: Joseph Coffland Date: Sun, 31 Jan 2021 07:03:45 +0000 (-0800) Subject: Fixed log rotate X-Git-Url: https://git.buildbotics.com/?a=commitdiff_plain;h=82180283c8c12748478633456e247bfcb3b933d7;p=bbctrl-firmware Fixed log rotate --- 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))