Exemple #1
0
 def _get_a(self, _type):
     """ Gets an instance implementing type <_type> """
     tmp = self._get_all(_type)
     ret = pick(tmp)
     if len(tmp) != 1:
         self.l.warn(("get_a: %s all implement %s; " +
                      "picking %s") % (tmp, _type, ret))
     return ret
Exemple #2
0
 def get_a(self, _type):
     return pick(self.get_all(_type))