#NEWLINE# def create_tmp_dir( function ) : #NEWLINE# #INDENT# 'Creates temporary directory for rsync purposes.\n    Removes created directory in the end.\n    ' #NEWLINE# @ functools . wraps ( function ) #NEWLINE# def decorated_function( * args , **kwargs ) : #NEWLINE# #INDENT# tmp_dir_path = tempfile . mkdtemp ( ) #NEWLINE# kwargs [ 'tmp_dir_path' ] = tmp_dir_path #NEWLINE# try : #NEWLINE# #INDENT# return function ( * args , ** kwargs ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# utils . execute ( 'rm' , '-rf' , tmp_dir_path ) #NEWLINE# #UNINDENT# #UNINDENT# return function