@plug.handler()
def start_upload(metadata):
    plug.logger.debug(u"Starting upload of {}", metadata.path)
    try:
        create_file_subdirs(sftp, metadata.path)
        plug.logger.debug(u"Adding {} to ignored files", metadata.path)
        events_to_ignore.add(metadata.path)
    except __HOLE__ as ioe:
        raise ServiceError(u"Failed to start upload of {}: {}"
                           .format(metadata.path, ioe))
dataset/ETHPy150Open onitu/onitu/drivers/sftp/onitu_sftp/sftp.py/start_upload