Remove unused method from manila/utils
We currently do not use the write_data_to_file method anymore, so there's not need for keeping it. Partially-Implements: bp privsep-migration Change-Id: Ibb626aea69083d77037730346bd517311e1638d4
This commit is contained in:
parent
aaead1795c
commit
d97366e679
|
@ -688,17 +688,6 @@ def if_notifications_enabled(function):
|
|||
return wrapped
|
||||
|
||||
|
||||
def write_local_file(filename, contents, as_root=False):
|
||||
tmp_filename = "%s.tmp" % filename
|
||||
if as_root:
|
||||
execute('tee', tmp_filename, run_as_root=True, process_input=contents)
|
||||
execute('mv', '-f', tmp_filename, filename, run_as_root=True)
|
||||
else:
|
||||
with open(tmp_filename, 'w') as f:
|
||||
f.write(contents)
|
||||
os.rename(tmp_filename, filename)
|
||||
|
||||
|
||||
def write_remote_file(ssh, filename, contents, as_root=False):
|
||||
tmp_filename = "%s.tmp" % filename
|
||||
if as_root:
|
||||
|
|
Loading…
Reference in New Issue