Author: gnichols Date: 2012-03-09 12:28:14 +0000 (Fri, 09 Mar 2012) New Revision: 1215
Modified: trunk/v7/certificationtest.py Log: 782191 - FEAT: v7 should be able to open a new certification request
Modified: trunk/v7/certificationtest.py =================================================================== --- trunk/v7/certificationtest.py 2012-03-09 12:27:54 UTC (rev 1214) +++ trunk/v7/certificationtest.py 2012-03-09 12:28:14 UTC (rev 1215) @@ -85,11 +85,16 @@
def setCertificationID(self, id): certificationElement = self.findOrCreateElement(self.document.documentElement, Tags.certification) - certificationElement.setAttribute(Attributes.id, id) + # throw ValueError if not an int + int(id) + certificationElement.setAttribute(Attributes.id, str(id))
def getCertificationID(self): certificationElement = self.findOrCreateElement(self.document.documentElement, Tags.certification) - return certificationElement.getAttribute(Attributes.id) + try: + return int(certificationElement.getAttribute(Attributes.id)) + except ValueError: + return 0
def getOSProductShortName(self): longName = self.getOS(Tags.product)