From 13a44243a853281905a4d967ada1cd7191f75dbb Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 15 Mar 2020 15:33:49 +0000 Subject: Added a SAFETY_LOCK on a bunch of functions. --- archinstall.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'archinstall.py') diff --git a/archinstall.py b/archinstall.py index bf434ddc..0d70b3e3 100644 --- a/archinstall.py +++ b/archinstall.py @@ -975,11 +975,12 @@ def filter_mirrors_by_country_list(countries, top=None, *positionals, **kwargs): return True def add_specific_mirrors(mirrors, *positionals, **kwargs): - with open('/etc/pacman.d/mirrorlist', 'a') as mirrorlist: - mirrorlist.write('\n') - for url in mirrors: - mirrorlist.write(f'# {mirrors[url]}\n') - mirrorlist.write(f'Server = {url}\n') + if not SAFETY_LOCK: + with open('/etc/pacman.d/mirrorlist', 'a') as mirrorlist: + mirrorlist.write('\n') + for url in mirrors: + mirrorlist.write(f'# {mirrors[url]}\n') + mirrorlist.write(f'Server = {url}\n') return True def strap_in_base(*positionals, **kwargs): -- cgit v1.2.3-70-g09d2