def METHOD_NAME (self):
    if self.freq and time.time() > self.rotate_when:
        self.rotate()
        self.rotate_when = self.next_backup(self.freq)
    elif self.maxsize:               # rotate when we get too big
        try:
            if os.stat(self.filename)[stat.ST_SIZE] > self.maxsize:
                self.rotate()
        except os.error:             # file not found, probably
            self.rotate()            # will create a new file