summaryrefslogtreecommitdiff
path: root/hacking/build_library
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2020-05-13 19:41:17 -0700
committerToshio Kuratomi <a.badger@gmail.com>2020-05-14 09:14:37 -0700
commita3c400d0ce9da2bbd25eee84838f4427113714e2 (patch)
tree0fe43b976c1b5f4ab1e84edd19af8fceca884dce /hacking/build_library
parentf2004874144eab5919eb8617915af0683c3dcd08 (diff)
downloadansible-a3c400d0ce9da2bbd25eee84838f4427113714e2.tar.gz
Remove outdated docs and unneeded import from change_detection build file
Diffstat (limited to 'hacking/build_library')
-rw-r--r--hacking/build_library/build_ansible/change_detection.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/hacking/build_library/build_ansible/change_detection.py b/hacking/build_library/build_ansible/change_detection.py
index a9fe56ce11..22e21d3c25 100644
--- a/hacking/build_library/build_ansible/change_detection.py
+++ b/hacking/build_library/build_ansible/change_detection.py
@@ -4,17 +4,9 @@
from __future__ import (absolute_import, division, print_function)
__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):
- '''
+ """
Replace file content only if content is different.
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
:b_data: Byte string containing the data to write to the file
- '''
+ """
try:
with open(filename, 'rb') as f:
b_data_old = f.read()