aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2017-12-17 00:14:16 +0100
committerkensington <kensington@gentoo.org>2017-12-21 20:10:26 +1100
commitb89019a5eee7f452890a9739fded3d155f8d14b9 (patch)
treeab3d2dd6cd29491a914815353cdac0b173b06962
parentuse portage API to split package atoms (diff)
downloadtatt-b89019a5eee7f452890a9739fded3d155f8d14b9.tar.gz
tatt-b89019a5eee7f452890a9739fded3d155f8d14b9.tar.bz2
tatt-b89019a5eee7f452890a9739fded3d155f8d14b9.zip
catch invalid package atoms returned by tinderbox
Tinderbox returns '[B]' in front of some package names. Filter them out to prevent exceptions.
-rw-r--r--tatt/tinderbox.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tatt/tinderbox.py b/tatt/tinderbox.py
index 4c389ed..b9ac774 100644
--- a/tatt/tinderbox.py
+++ b/tatt/tinderbox.py
@@ -12,6 +12,7 @@ from subprocess import *
import random
from .gentooPackage import gentooPackage as gP
+from portage.dep import isvalidatom
## TODO: Make the number of rdeps to sample a config option
## Pass the config on to this function:
@@ -59,7 +60,8 @@ def stablerdeps (package, config):
d = dict([])
for s in splitlist:
# Saves necessary useflags under package names, removing duplicates.
- d[gP(s[0]).packageCatName()] = s[1]
+ if isvalidatom('=' + s[0]):
+ d[gP(s[0]).packageCatName()] = s[1]
outlist2 = [[k, d[k]] for k in list(d.keys())]
outlist = []
# outlist2 is set up at this point. It contains all candidates. To cut it down we sample