#NEWLINE# def chown( path , uid , gid ) : #NEWLINE# #INDENT# if ( gid is None ) : #NEWLINE# #INDENT# uid = ( - 1 ) #NEWLINE# #UNINDENT# if ( gid is None ) : #NEWLINE# #INDENT# gid = ( - 1 ) #NEWLINE# #UNINDENT# if ( ( uid == ( - 1 ) ) and ( gid == ( - 1 ) ) ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# LOG . debug ( ( 'Changing ownership of %r to %s:%s' % ( path , uid , gid ) ) ) #NEWLINE# os . chown ( path , uid , gid ) #NEWLINE# return 1