Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

        def check_message(message, check_paths=True):
    if type(message) != dict:
        raise BTFailure('bad metainfo - wrong object type')
    check_info(message.get('info'), check_paths)
    if type(message.get('announce')) != str:
        raise BTFailure('bad metainfo - no announce URL string')
        


src/a/n/Anomos-HEAD/Anomos/ConvertedMetainfo.py   Anomos(Download)
            self.anon = bool(metainfo['anon'])
 
        btformats.check_message(metainfo, check_paths=False)
        info = metainfo['info']
        if info.has_key('length'):

src/a/n/Anomos-HEAD/Anomos/parsedir.py   Anomos(Download)
 
from Anomos.bencode import bencode, bdecode
from Anomos.btformats import check_message
 
NOISY = False
            ff = open(p, 'rb')
            d = bdecode(ff.read())
            check_message(d)
            h = hashlib.sha1(bencode(d['info'])).digest()
            new_file[1] = h