예제 #1
0
    def __init__(self, id, title=None, references=None):
        if not references: references = []
        tk.assertType(str, id=id)
        tk.assertType((str, None), title=title)
        tk.assertType((list, tuple, None), references=references)
        if references:
            tk.assertTypeForAllIn(str, references)

        self.id = tk.toStringFormattedCPE(id)
        self.id_2_2 = tk.toOldCPE(id)
        self.title = title if title else tk.cpeTitle(self.id)
        self.references = references and list(references) or []
예제 #2
0
 def api_cpe22(self, cpe):
     cpe = tk.toOldCPE(cpe)
     return cpe if cpe else "None"
예제 #3
0
 def api_cpe22(self, cpe):
   cpe = tk.toOldCPE(cpe)
   return cpe if cpe else "None"