- split = x.split(' - ') #self.blacklisted_packages
- if not any(split[0].strip().endswith(x) for x in self.unwanted_extensions):
- self.packetlist.append([split[0].strip(), split[1].strip(),split[2].strip()])
+ tokens = x.split(' - ') #self.blacklisted_packages
+ name = tokens[0].strip()
+ if not any(name.endswith(x) for x in self.unwanted_extensions):
+ l = len(tokens)
+ version = l > 1 and tokens[1].strip() or ""
+ descr = l > 2 and tokens[2].strip() or ""
+ self.packetlist.append([name, version, descr])