#NEWLINE# def endWrite( self , withErrors ) : #NEWLINE# #INDENT# if withErrors : #NEWLINE# #INDENT# self . app . logger . error ( 'webdav.endWrite error: %r' , withErrors ) #NEWLINE# return super ( ScriptResource , self ) . endWrite ( info ) #NEWLINE# #UNINDENT# if ( not self . writebuffer ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# projectdb = self . app . config [ 'projectdb' ] #NEWLINE# if ( not projectdb ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# info = { #NEWLINE# #INDENT# 'script' : text ( getattr ( self . writebuffer , 'content' , '' ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# if ( self . project . get ( 'status' ) in ( 'DEBUG' , 'RUNNING' ) ) : #NEWLINE# #INDENT# info [ 'status' ] = 'CHECKING' #NEWLINE# #UNINDENT# if self . new_project : #NEWLINE# #INDENT# self . project . update ( info ) #NEWLINE# self . new_project = False #NEWLINE# return projectdb . insert ( self . project_name , self . project ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return projectdb . update ( self . project_name , info )