Skip to content
Snippets Groups Projects
Commit 76df14c8 authored by Frede H's avatar Frede H :speech_balloon:
Browse files

that conversion was not forgotten

it has been placed under scripts/pacman-mirrors
parent ab8629d3
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,7 @@ class PacmanMirrors:
"config_file": conf.CONFIG_FILE # purpose - testability
}
self.custom = False
self.default = False
self.fasttrack = None
self.geoip = False
self.interactive = False
......@@ -126,6 +127,9 @@ class PacmanMirrors:
parser.add_argument("-l", "--list",
action="store_true",
help=txt.HLP_ARG_LIST)
parser.add_argument("--default",
action="store_true",
help=txt.HLP_ARG_DEFAULT)
args = parser.parse_args()
......@@ -176,6 +180,9 @@ class PacmanMirrors:
if not os.environ.get("DISPLAY") or not GTK_AVAILABLE:
self.no_display = True
if args.interactive and args.default:
self.default = True
# geoip and country are mutually exclusive
if args.geoip:
self.geoip = True
......@@ -339,6 +346,8 @@ class PacmanMirrors:
def load_custom_mirrors(self):
"""Load available custom mirrors"""
if self.default:
self.config["custom_file"] = "mirrors.json"
self.seed_mirrors(self.config["custom_file"])
def load_default_mirrors(self):
......@@ -387,7 +396,6 @@ class PacmanMirrors:
"""Run"""
(self.config, self.custom) = configfn.build_config()
filefn.dir_must_exist(self.config["mirror_dir"])
customfn.convert_to_json()
self.command_line_parse()
self.network = httpfn.is_connected("https://manjaro.org")
if self.network:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment