aboutsummaryrefslogtreecommitdiff
path: root/grs
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-08-08 14:04:08 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-08-08 14:04:08 -0400
commiteb55566218915335cbf9445b1c6176ce9023f025 (patch)
tree7ae22f13fb817ceca49d22b1f98d2147abdc9b70 /grs
parentTODO: update (diff)
downloadgrss-eb55566218915335cbf9445b1c6176ce9023f025.tar.gz
grss-eb55566218915335cbf9445b1c6176ce9023f025.tar.bz2
grss-eb55566218915335cbf9445b1c6176ce9023f025.zip
grs/WorldConf.py: don't delete from non-existing directories.
Diffstat (limited to 'grs')
-rw-r--r--grs/WorldConf.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/grs/WorldConf.py b/grs/WorldConf.py
index 63daace..c496e5f 100644
--- a/grs/WorldConf.py
+++ b/grs/WorldConf.py
@@ -13,7 +13,7 @@ class WorldConf():
# TODO: This needs to be expanded.
manageddirs = ['env', 'package.env', 'package.accept_keywords', \
- 'package.use', 'package.mask', 'package.unmask']:
+ 'package.use', 'package.mask', 'package.unmask']
@staticmethod
def install():
@@ -25,6 +25,8 @@ class WorldConf():
# orphaned and can inject flags/envvars which are problematic.
for directory in WorldConf.manageddirs:
dpath = os.path.join(CONST.PORTAGE_CONFIGDIR, directory)
+ if not os.path.isdir(dpath):
+ continue
for f in os.listdir(dpath):
fpath = os.path.join(dpath, f)
if os.path.isfile(fpath):