示例#1
0
    def getByGUID(self, guid):
        guid = guid.upper()

        try:
            return self[self._guidIndex[guid]]
        except:
            for cid,c in self.items():
                if c.guid and c.guid == guid:
                    self._guidIndex[guid] = c.cid
                    return c
                elif functions.fuzzyGuidMatch(c.guid, guid):
                    # Found by fuzzy matching, don't index
                    return c
                    
        return None
示例#2
0
    def getByGUID(self, guid):
        guid = guid.upper()

        try:
            return self[self._guidIndex[guid]]
        except:
            for cid,c in self.items():
                if c.guid and c.guid == guid:
                    self._guidIndex[guid] = c.cid
                    return c
                elif functions.fuzzyGuidMatch(c.guid, guid):
                    # Found by fuzzy matching, don't index
                    return c
                    
        return None
示例#3
0
 def getByGUID(self, guid):
     """
     Return the client matching the given GUID.
     :param guid: The GUID to match
     """
     guid = guid.upper()
     try:
         return self[self._guidIndex[guid]]
     except Exception:
         for cid,c in self.items():
             if c.guid and c.guid == guid:
                 self._guidIndex[guid] = c.cid
                 return c
             elif functions.fuzzyGuidMatch(c.guid, guid):
                 # found by fuzzy matching: don't index
                 return c
     return None
示例#4
0
 def getByGUID(self, guid):
     """
     Return the client matching the given GUID.
     :param guid: The GUID to match
     """
     guid = guid.upper()
     try:
         return self[self._guidIndex[guid]]
     except Exception:
         for cid,c in self.items():
             if c.guid and c.guid == guid:
                 self._guidIndex[guid] = c.cid
                 return c
             elif functions.fuzzyGuidMatch(c.guid, guid):
                 # found by fuzzy matching: don't index
                 return c
     return None