Пример #1
0
 def createAttribute(self, attr):
     try:
         return ConfigDB.getAttributeByName(attr.name)
     except UnknownAttributeName, e:
         self._log.info("Creating attribute: %s" % (attr.name))
         ConfigDB.createAttribute(attr)
         self._log.debug("Created attribute [%s] with ID %d" % (attr.name, attr.id))
         return attr
Пример #2
0
 def createAttribute(self, attr):
     try:
         return ConfigDB.getAttributeByName(attr.name)
     except UnknownAttributeName, e:
         self._log.info("Creating attribute: %s" % (attr.name))
         ConfigDB.createAttribute(attr)
         self._log.debug("Created attribute [%s] with ID %d" %
                         (attr.name, attr.id))
         return attr