diff --git a/pym/cl_utils.py b/pym/cl_utils.py index c6f2915..2d04135 100644 --- a/pym/cl_utils.py +++ b/pym/cl_utils.py @@ -872,12 +872,18 @@ def getPkgUses(fullpkg): return None usePath = os.path.join(pkgCategory,packages[-1]['PF'],"USE") iusePath = os.path.join(pkgCategory,packages[-1]['PF'],"IUSE") + iuse = open(iusePath,'r').read().strip().split() \ + if os.path.exists(iusePath) else \ + [] + use = open(usePath,'r').read().strip().split() \ + if os.path.exists(usePath) else \ + [] return (map(lambda x:x[1:] if x.startswith("+") else x, filter(lambda x:x, - open(usePath,'r').read().strip().split())), + use)), map(lambda x:x[1:] if x.startswith("+") else x, filter(lambda x:x, - open(iusePath,'r').read().strip().split()))) + iuse))) def getPkgActiveUses(fullpkg): """Get active uses from package"""