def remove_immutable_attribute(path):
 if ((platform.system() == constants.PLATFORM_DARWIN) and os.path.isfile('/usr/bin/chflags')):
  subprocess.call(['/usr/bin/chflags', '-R', 'nouchg', path])
 elif ((platform.system() == constants.PLATFORM_LINUX) and os.path.isfile('/usr/bin/chattr')):
  subprocess.call(['/usr/bin/chattr', '-R', '-i', path])

def remove_immutable_attribute ( path ) : if ( ( platform . system ( ) == constants . PLATFORM_DARWIN ) and os . path . isfile ( '/usr/bin/chflags' ) ) : subprocess . call ( [ '/usr/bin/chflags' , '-R' , 'nouchg' , path ] ) elif ( ( platform . system ( ) == constants . PLATFORM_LINUX ) and os . path . isfile ( '/usr/bin/chattr' ) ) : subprocess . call ( [ '/usr/bin/chattr' , '-R' , '-i' , path ] )
remove the immutable attribute of the given path .