mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] merge double with
This commit is contained in:
parent
2f4f254612
commit
4a9b89d12e
1 changed files with 6 additions and 8 deletions
|
@ -185,8 +185,7 @@ def _certificate_install_selfsigned(domain_list, force=False):
|
|||
|
||||
# Create our conf file, based on template, replacing the occurences of
|
||||
# "yunohost.org" with the given domain
|
||||
with open(conf_file, "w") as f:
|
||||
with open(conf_template, "r") as template:
|
||||
with open(conf_file, "w") as f, open(conf_template, "r") as template:
|
||||
for line in template:
|
||||
f.write(line.replace("yunohost.org", domain))
|
||||
|
||||
|
@ -216,8 +215,7 @@ def _certificate_install_selfsigned(domain_list, force=False):
|
|||
os.symlink(original_ca_file, ca_file)
|
||||
|
||||
# Append ca.pem at the end of crt.pem
|
||||
with open(ca_file, "r") as ca_pem:
|
||||
with open(crt_file, "a") as crt_pem:
|
||||
with open(ca_file, "r") as ca_pem, open(crt_file, "a") as crt_pem:
|
||||
crt_pem.write("\n")
|
||||
crt_pem.write(ca_pem.read())
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue