From d117008256f910081ae4e9fe45396cd84a55f1be Mon Sep 17 00:00:00 2001
From: fhdk <fh@uex.dk>
Date: Fri, 3 Mar 2017 13:05:57 +0100
Subject: [PATCH] decision on if custom and not selection

---
 pacman_mirrors/configfn.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pacman_mirrors/configfn.py b/pacman_mirrors/configfn.py
index 4adbaaf8..c2c14bbf 100644
--- a/pacman_mirrors/configfn.py
+++ b/pacman_mirrors/configfn.py
@@ -100,11 +100,14 @@ def write_configuration(filename, selection, custom=False):
     if custom:
         if selection == ["Custom"]:
             selection = "OnlyCountry = Custom\n"
+        elif not selection:
+            selection = "# OnlyCountry = \n"
         else:
             selection = "OnlyCountry = {list}\n".format(
                 list=",".join(selection))
     else:
         selection = "# OnlyCountry = \n"
+
     try:
         with open(
             filename) as cnf, tempfile.NamedTemporaryFile(
-- 
GitLab