#NEWLINE# def save( menu ) : #NEWLINE# #INDENT# scriptWindow = menu . ancestor ( GafferUI . ScriptWindow ) #NEWLINE# script = scriptWindow . scriptNode ( ) #NEWLINE# if script [ 'fileName' ] . getValue ( ) : #NEWLINE# #INDENT# with GafferUI . ErrorDialogue . ExceptionHandler ( title = 'Error Saving File' , parentWindow = script ) : #NEWLINE# #INDENT# script . save ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# saveAs ( menu )