(source, dest)
| 6510 | return name + ".gz" |
| 6511 | |
| 6512 | def rotator(source, dest): |
| 6513 | with open(source, "rb") as sf: |
| 6514 | data = sf.read() |
| 6515 | compressed = zlib.compress(data, 9) |
| 6516 | with open(dest, "wb") as df: |
| 6517 | df.write(compressed) |
| 6518 | os.remove(source) |
| 6519 | |
| 6520 | rh = logging.handlers.RotatingFileHandler( |
| 6521 | self.fn, encoding="utf-8", backupCount=2, maxBytes=1) |