You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/08/04 16:53:09 UTC
[incubator-dlab] branch DLAB-1594-2 updated: [DLAB-1594]: made echo
quiet
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DLAB-1594-2
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1594-2 by this push:
new 0b40c9e [DLAB-1594]: made echo quiet
0b40c9e is described below
commit 0b40c9e645c03cb5f6966af5a066a1fcf170e0d5
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Tue Aug 4 19:52:30 2020 +0300
[DLAB-1594]: made echo quiet
---
infrastructure-provisioning/src/general/lib/os/debian/common_lib.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
index ee36762..deedcbf 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
@@ -201,11 +201,11 @@ def run_certbot(domain_name, node, email=''):
def find_replace_line(file_path, searched_str, replacement_line):
try:
lines = sudo('cat {}'.format(file_path)).split('\r\n')
- sudo('echo "" > {}'.format(file_path))
+ sudo('rm {0}; touch {0}'.format(file_path))
for n, line in enumerate(lines):
if searched_str in line:
lines[n] = replacement_line
- sudo('echo \'{}\' >> {}'.format(lines[n], file_path))
+ sudo('echo \'{}\' >> {}'.format(lines[n], file_path), quiet=True)
except Exception as err:
traceback.print_exc()
print('Failed to replace string: ' + str(err))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org