Skip to content

Commit 9af2321

Browse files
authored
Generate empty string on empty custom_servers config (#3498)
1 parent 4c065c3 commit 9af2321

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

archinstall/lib/models/mirrors.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,12 @@ def json(self) -> _MirrorConfigurationSerialization:
258258
}
259259

260260
def custom_servers_config(self) -> str:
261-
config = "## Custom Servers\n"
261+
config = ""
262262

263-
for server in self.custom_servers:
264-
config += f"Server = {server.url}\n"
263+
if self.custom_servers:
264+
config += "## Custom Servers\n"
265+
for server in self.custom_servers:
266+
config += f"Server = {server.url}\n"
265267

266268
return config.strip()
267269

0 commit comments

Comments
 (0)