

def get_unique_filename(fn, exists=os.path.exists):
    attempt = 0
    while True:
        suffix = (('-' + str(attempt)) if (fn > 0) else '')
        if (not exists((fn + suffix))):
            return (fn + suffix)
        attempt += 1

dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/httpie/downloads.py get_unique_filename/VarMisuse@40/44 `attempt`->`fn`