#NEWLINE# def clear_upload_files( user , session ) : #NEWLINE# #INDENT# ' Delete uploaded yang files which are not committed ' #NEWLINE# directory = ServerSettings . session_path ( session ) #NEWLINE# if ( not os . path . exists ( directory ) ) : #NEWLINE# #INDENT# logging . debug ( ( 'Session storage %s does not exist' % directory ) ) #NEWLINE# return ( False , None ) #NEWLINE# #UNINDENT# modules = ET . Element ( 'modules' ) #NEWLINE# for _file in glob . glob ( os . path . join ( directory , '*' ) ) : #NEWLINE# #INDENT# os . remove ( _file ) #NEWLINE# #UNINDENT# return ( True , modules )