-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62156/#review184921
-----------------------------------------------------------


Ship it!




Ship It!

- Qiang Zhang


On 九月 7, 2017, 1:45 p.m., pengjianhua wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62156/
> -----------------------------------------------------------
> 
> (Updated 九月 7, 2017, 1:45 p.m.)
> 
> 
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O 
> hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan 
> Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
> 
> 
> Bugs: RANGER-1769
>     https://issues.apache.org/jira/browse/RANGER-1769
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Even if the attribute value is first matched, the following code segment will 
> still traverse all the attributes.
> root = xml.getroot()
> for child in root.findall('property'):
>     name = child.find("name").text.strip()
>     if name == property_name:
>         child.find("value").text = property_value
> xml.write(xml_path)
> 
> The program should exit the loop to improve execution efficiency once the 
> attribute value is set.
> 
> 
> Diffs
> -----
> 
>   security-admin/scripts/update_property.py 80ccdb8f 
> 
> 
> Diff: https://reviews.apache.org/r/62156/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> pengjianhua
> 
>

Reply via email to