]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Switch to using neutron.common.utils:replace_file()
authorBogdan Tabor <bogdan.tabor@ericpol.com>
Mon, 12 Oct 2015 10:07:54 +0000 (12:07 +0200)
committerBogdan Tabor <bogdan.tabor@ericpol.com>
Wed, 4 Nov 2015 14:46:31 +0000 (15:46 +0100)
neutron.agent.linux.utils:replace_file() and
neutron.common.utils:replace_file() have same functionality.

This is the final patch in a series of 4 patches.
It marks neutron.agent.linux.utils:replace_file() for removal.

Closes-bug: #1504477
Depends-On: Id0eb6829ce75df5ffccc354adfe2f0ccb19ed9fd
Depends-On: I4352b7f1d6a55e47bbff4f3a1fcf136ed645dcbe
Change-Id: I26b0a4d6105420a2c242b81a4cd58e0adef4cbec

neutron/agent/linux/utils.py

index f3c8da77261fe53283373d4e9485e953d98f9685..f93f15b8ca1d7cb6cdd3bedc1e68f65906184257 100644 (file)
@@ -24,6 +24,7 @@ import struct
 import tempfile
 import threading
 
+import debtcollector
 import eventlet
 from eventlet.green import subprocess
 from eventlet import greenthread
@@ -177,6 +178,7 @@ def get_interface_mac(interface):
                     for char in info[MAC_START:MAC_END]])[:-1]
 
 
+@debtcollector.removals.remove(message="Redundant in Mitaka release.")
 def replace_file(file_name, data, file_mode=0o644):
     """Replaces the contents of file_name with data in a safe manner.