def operation_upload(uploader, sources, verify, do_compile, do_file, do_restart):
sources, destinations = destination_from_source(sources)<EOL>if len(destinations) == len(sources):<EOL><INDENT>if uploader.prepare():<EOL><INDENT>for filename, dst in zip(sources, destinations):<EOL><INDENT>if do_compile:<EOL><INDENT>uploader.file_remove(os.path.splitext(dst)[<NUM_LIT:0>]+'<STR_LIT>')<EOL><DEDENT>uploader.write_file(filename, dst, verify)<EOL>if do_compile and dst != '<STR_LIT>':<EOL><INDENT>uploader.file_compile(dst)<EOL>uploader.file_remove(dst)<EOL>if do_file:<EOL><INDENT>uploader.file_do(os.path.splitext(dst)[<NUM_LIT:0>]+'<STR_LIT>')<EOL><DEDENT><DEDENT>elif do_file:<EOL><INDENT>uploader.file_do(dst)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>if do_restart:<EOL><INDENT>uploader.node_restart()<EOL><DEDENT>log.info('<STR_LIT>')<EOL>
The upload operation