mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-23 09:16:51 +00:00
Fixed minor logical issues
This commit is contained in:
parent
f8a3c94fdd
commit
a8ccab1901
4
main.py
4
main.py
|
@ -156,7 +156,6 @@ def createUser():
|
||||||
print("[DEBUG] Read line!")
|
print("[DEBUG] Read line!")
|
||||||
|
|
||||||
for line in fileContent:
|
for line in fileContent:
|
||||||
index += 1
|
|
||||||
if line.startswith(" loginAccounts = {"):
|
if line.startswith(" loginAccounts = {"):
|
||||||
print("[DEBUG] Found mailuser configuration snippet match!")
|
print("[DEBUG] Found mailuser configuration snippet match!")
|
||||||
print("[INFO] Writing new user configuration snippet to memory...", sep="")
|
print("[INFO] Writing new user configuration snippet to memory...", sep="")
|
||||||
|
@ -164,7 +163,8 @@ def createUser():
|
||||||
fileContent.insert(index, mailUserTemplate)
|
fileContent.insert(index, mailUserTemplate)
|
||||||
print("done")
|
print("done")
|
||||||
break
|
break
|
||||||
|
index += 1
|
||||||
|
|
||||||
readWriteFileDescriptor = open("/etc/nixos/mailserver/system/mailserver.nix", "w")
|
readWriteFileDescriptor = open("/etc/nixos/mailserver/system/mailserver.nix", "w")
|
||||||
|
|
||||||
mailUserConfigurationWriteOperationResult = readWriteFileDescriptor.writelines(fileContent)
|
mailUserConfigurationWriteOperationResult = readWriteFileDescriptor.writelines(fileContent)
|
||||||
|
|
Loading…
Reference in a new issue