Example #1
0
 def lookupGroup(self, name):
     assert isinstance(name, unicode)
     name = name.lower()
     try:
         group = self.groups[name]
     except KeyError:
         return defer.fail(failure.Failure(ewords.NoSuchGroup(name)))
     else:
         return defer.succeed(group)
Example #2
0
    def lookupGroup(self, name):
        """
        Looks for the group in the local shard's store.
        """
        assert isinstance(name, unicode)
        name = name.lower()

        group = self.groups.get(name)
        if group:
            return defer.succeed(group)

        return defer.fail(failure.Failure(ewords.NoSuchGroup(name)))