Generate empty string on empty custom_servers config (#3498)

This commit is contained in:
Omrifo4 2025-05-24 02:11:45 +03:00 committed by GitHub
parent 4c065c3698
commit 9af23218c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -258,10 +258,12 @@ class MirrorConfiguration:
}
def custom_servers_config(self) -> str:
config = "## Custom Servers\n"
config = ""
for server in self.custom_servers:
config += f"Server = {server.url}\n"
if self.custom_servers:
config += "## Custom Servers\n"
for server in self.custom_servers:
config += f"Server = {server.url}\n"
return config.strip()