diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-08 16:10:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-08 16:10:24 +0100 |
commit | f587c2de87665b10e70b4143989572b19e43c08c (patch) | |
tree | 9d68aec0a5fa92d4f7a3a377b205a89610221a73 /src/backend/branchreset.py | |
parent | 1d30457b03e7906770ee40a774320121e80a4bfd (diff) |
rename some constants to something more pretty
Diffstat (limited to 'src/backend/branchreset.py')
-rw-r--r-- | src/backend/branchreset.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/branchreset.py b/src/backend/branchreset.py index def225a..6df4347 100644 --- a/src/backend/branchreset.py +++ b/src/backend/branchreset.py @@ -7,23 +7,23 @@ import sisyphus.filesystem @animation.wait('resetting branch configuration') def start(): - if os.path.isdir(sisyphus.filesystem.gentooEbuildDir): - for files in os.listdir(sisyphus.filesystem.gentooEbuildDir): - if os.path.isfile(os.path.join(sisyphus.filesystem.gentooEbuildDir, files)): - os.remove(os.path.join(sisyphus.filesystem.gentooEbuildDir, files)) + if os.path.isdir(sisyphus.filesystem.portageRepoDir): + for files in os.listdir(sisyphus.filesystem.portageRepoDir): + if os.path.isfile(os.path.join(sisyphus.filesystem.portageRepoDir, files)): + os.remove(os.path.join(sisyphus.filesystem.portageRepoDir, files)) else: - shutil.rmtree(os.path.join(sisyphus.filesystem.gentooEbuildDir, files)) + shutil.rmtree(os.path.join(sisyphus.filesystem.portageRepoDir, files)) else: - os.makedirs(sisyphus.filesystem.gentooEbuildDir) + os.makedirs(sisyphus.filesystem.portageRepoDir) - if os.path.isdir(sisyphus.filesystem.redcoreEbuildDir): - for files in os.listdir(sisyphus.filesystem.redcoreEbuildDir): - if os.path.isfile(os.path.join(sisyphus.filesystem.redcoreEbuildDir, files)): - os.remove(os.path.join(sisyphus.filesystem.redcoreEbuildDir, files)) + if os.path.isdir(sisyphus.filesystem.redcoreRepoDir): + for files in os.listdir(sisyphus.filesystem.redcoreRepoDir): + if os.path.isfile(os.path.join(sisyphus.filesystem.redcoreRepoDir, files)): + os.remove(os.path.join(sisyphus.filesystem.redcoreRepoDir, files)) else: - shutil.rmtree(os.path.join(sisyphus.filesystem.redcoreEbuildDir, files)) + shutil.rmtree(os.path.join(sisyphus.filesystem.redcoreRepoDir, files)) else: - os.makedirs(sisyphus.filesystem.redcoreEbuildDir) + os.makedirs(sisyphus.filesystem.redcoreRepoDir) if os.path.isdir(sisyphus.filesystem.portageConfigDir): for files in os.listdir(sisyphus.filesystem.portageConfigDir): |