Remove outdated docs and unneeded import from change_detection build file
This commit is contained in:
parent
f200487414
commit
a3c400d0ce
1 changed files with 2 additions and 10 deletions
|
@ -4,17 +4,9 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
"""
|
|
||||||
This file contains common code for building ansible. If you want to use code from here at runtime,
|
|
||||||
it needs to be moved out of this file and the implementation looked over to figure out whether API
|
|
||||||
should be changed before being made public.
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
|
|
||||||
def update_file_if_different(filename, b_data):
|
def update_file_if_different(filename, b_data):
|
||||||
'''
|
"""
|
||||||
Replace file content only if content is different.
|
Replace file content only if content is different.
|
||||||
|
|
||||||
This preserves timestamps in case the file content has not changed. It performs multiple
|
This preserves timestamps in case the file content has not changed. It performs multiple
|
||||||
|
@ -22,7 +14,7 @@ def update_file_if_different(filename, b_data):
|
||||||
|
|
||||||
:arg filename: The filename to write to
|
:arg filename: The filename to write to
|
||||||
:b_data: Byte string containing the data to write to the file
|
:b_data: Byte string containing the data to write to the file
|
||||||
'''
|
"""
|
||||||
try:
|
try:
|
||||||
with open(filename, 'rb') as f:
|
with open(filename, 'rb') as f:
|
||||||
b_data_old = f.read()
|
b_data_old = f.read()
|
||||||
|
|
Loading…
Reference in a new issue