def _copy(src_filename, dst_filename, ftp_params=None, src_open_mode="rb"):
    if not ftp_params:
        shutil.copy(src_filename, dst_filename)
        return

    with open(src_filename, src_open_mode) as f:
        ftp = get_ftp(ftp_params)
        command = dst_filename % 'STOR %s'
        try:
            if "b" in src_open_mode:
                ftp.storbinary(command, f)
            else:
                ftp.storlines(command, f)
        except BaseException, e:
            print "Cannot STOR %s" % dst_filename
            close_ftp_conn(ftp, ftp_params)
            raise e

        close_ftp_conn(ftp, ftp_params)
dataset/ETHPy150Open Starou/SimpleIDML/src/simple_idml/indesign/indesign.py/_copy/swapped operands of `%`