Exemple #1
0
 def check_third_party_caveat(self, ctx, info):
     if self._loc == 'as1-loc':
         return [checkers.Caveat(condition='something',
                                 location='as2-loc')]
     if self._loc == 'as2-loc':
         return []
     raise common.ThirdPartyCaveatCheckFailed(
         'unknown location {}'.format(self._loc))
Exemple #2
0
 def check_third_party_caveat(self, ctx, cav_info):
     if cav_info.condition == b'x':
         return [checkers.declared_caveat('foo', 'fooval1')]
     if cav_info.condition == b'y':
         return [
             checkers.declared_caveat('foo', 'fooval2'),
             checkers.declared_caveat('baz', 'bazval')
         ]
     raise common.ThirdPartyCaveatCheckFailed('not matched')