Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-03-15 15:33:49 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-03-15 15:33:49 +0000
commit13a44243a853281905a4d967ada1cd7191f75dbb (patch)
tree658dca669de48a1ae7e906bd2aa443cb228ab4e6
parent7684ea1304fbaf794a97263c9bc9931ea602866d (diff)
Added a SAFETY_LOCK on a bunch of functions.
-rw-r--r--archinstall.py11
1 files changed, 6 insertions, 5 deletions
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):