

def _run_ftp_server():
    from pyftpdlib.authorizers import DummyAuthorizer
    from pyftpdlib.handlers import FTPHandler
    from pyftpdlib.servers import FTPServer
    authorizer = DummyAuthorizer()
    tmp_folder = '/tmp/luigi-test-ftp-server/'
    if os.path.exists(tmp_folder):
        shutil.rmtree(tmp_folder)
    os.mkdir(tmp_folder)
    authorizer.add_user(USER, PWD, tmp_folder, perm='elradfmwM')
    handler = FTPHandler
    handler.authorizer = authorizer
    address = ('localhost', 21)
    server = FTPServer(address, server)
    server.serve_forever()

dataset/ETHPy150Open spotify/luigi/test/_test_ftp.py _run_ftp_server/VarMisuse@106/165 `handler`->`server`