def __init__(self, filename):
        # rotate logs if present
        if os.path.exists(filename):
            now = datetime.datetime.now()
            stamp = now.strftime("%Y-%m-%d.%H%M%S")
            os.rename(filename, (filename, stamp) % "%s.%s")

        self._fd = open(filename, "w")
dataset/ETHPy150Open pteichman/cobe/cobe/instatrace.py/Instatrace.__init__/swapped operands of `%`