mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Email on certificate renewing failed (#1227)
* [fix] Email on certificate renewing failed * [enh] Use check_output instead of subprocess * Update src/yunohost/certificate.py Co-authored-by: Kayou <pierre.moltess@gmail.com> * [mod] Use f-string for readability Co-authored-by: Kayou <pierre.moltess@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
0f10b91fa1
commit
ea5a6d301f
1 changed files with 2 additions and 8 deletions
|
@ -949,11 +949,5 @@ def _name_self_CA():
|
||||||
|
|
||||||
|
|
||||||
def _tail(n, file_path):
|
def _tail(n, file_path):
|
||||||
stdin, stdout = os.popen2("tail -n %s '%s'" % (n, file_path))
|
from moulinette.utils.process import check_output
|
||||||
|
return check_output(f"tail -n {n} '{file_path}'")
|
||||||
stdin.close()
|
|
||||||
|
|
||||||
lines = stdout.readlines()
|
|
||||||
stdout.close()
|
|
||||||
|
|
||||||
return "".join(lines)
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue