summaryrefslogtreecommitdiff
path: root/src/backend/mirror.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-06 20:37:56 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-06 20:37:56 +0100
commited88746cd33c0f861e9c45bf05bf9e44d86089ba (patch)
treee6656f3d54bd738383d048c744d330dca2c15e4c /src/backend/mirror.py
parent2d86cd9ddc5d9442e4a8e8fb50d72480a8293a4a (diff)
filesystem module : gather all the folder and file paths used by sisyphus under one module, and expose them to other modules from there
Diffstat (limited to 'src/backend/mirror.py')
-rw-r--r--src/backend/mirror.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/mirror.py b/src/backend/mirror.py
index 7d041cf..6843e59 100644
--- a/src/backend/mirror.py
+++ b/src/backend/mirror.py
@@ -1,11 +1,11 @@
#!/usr/bin/python3
-mirrorCfg = '/etc/sisyphus/mirrors.conf'
+import sisyphus.filesystem
def getList():
mirrorList = []
- with open(mirrorCfg) as mirrorFile:
+ with open(sisyphus.filesystem.mirrorCfg) as mirrorFile:
for line in mirrorFile.readlines():
if 'PORTAGE_BINHOST=' in line:
url = line.split("=")[1].replace('"', '').rstrip()
@@ -27,7 +27,7 @@ def printList():
print(i + 1, ' ', line['Url'])
def writeList(mirrorList):
- with open(mirrorCfg, 'w+') as mirrorFile:
+ with open(sisyphus.filesystem.mirrorCfg, 'w+') as mirrorFile:
mirrorFile.write("#######################################################\n")
mirrorFile.write("# Support for multiple mirrors is somewhat incomplete #\n")
mirrorFile.write("#######################################################\n")