commit: eb55566218915335cbf9445b1c6176ce9023f025
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 8 18:04:08 2015 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Aug 8 18:04:08 2015 +0000
URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=eb555662
grs/WorldConf.py: don't delete from non-existing directories.
grs/WorldConf.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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):