def parse_keywords(keywords): if isinstance(keywords, tuple): keywords = ','.join(keywords) if ',' in keywords: keywords = map(lambda k: k.strip(), keywords.split(',')) else: keywords = keywords.split(' ') for kwd in keywords: if not kwd.strip(): continue yield kwd # Get GitHub labels; we'll merge Trac components into them logging.info("Getting existing GitHub labels...") gh_labels = set() for label in github.labels(): gh_labels.add(label['name']) logging.info("Getting the set of labels in Trac....") trac_labels = set() trac_label_colors = { 'resolution': { 'fixed': '228b22', 'wontfix': 'bebebe', 'duplicate': 'c8c8c8', 'invalid': 'aaaaaa', 'worksforme': '008c8c', 'reqconfirm': 'e16a9d', }, 'priority': { 'blocker': '800000', 'critical': 'a52a2a',