(source, dest)
| 6342 | return name + ".gz" |
| 6343 | |
| 6344 | def rotator(source, dest): |
| 6345 | with open(source, "rb") as sf: |
| 6346 | data = sf.read() |
| 6347 | compressed = zlib.compress(data, 9) |
| 6348 | with open(dest, "wb") as df: |
| 6349 | df.write(compressed) |
| 6350 | os.remove(source) |
| 6351 | |
| 6352 | rh = logging.handlers.RotatingFileHandler( |
| 6353 | self.fn, encoding="utf-8", backupCount=2, maxBytes=1) |