From a3c400d0ce9da2bbd25eee84838f4427113714e2 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 13 May 2020 19:41:17 -0700 Subject: [PATCH] Remove outdated docs and unneeded import from change_detection build file --- .../build_library/build_ansible/change_detection.py | 12 ++---------- 1 file 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 a9fe56ce112..22e21d3c253 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()