harvester_odt/pat_statistica/client.py
def force_iter_datasets(self):
        """Iterate datasets, then try guessing numbers"""

        found = set()
        for record in self.iter_datasets():
            found.add(int(record['id']))
            yield record

        # Let's try guessing numbers up to 20% more than the highest
        # id found in the list.
        stop = int(max(int(x) for x in found) * 1.2)
        for i in xrange(1, stop + 1):
            if i in found:
                # We already returned this one
                continue
            try:
                yield self.get_dataset(i)
            except:  # Simply ignore anything bad that would happen..
                logger.exception("Exception while trying to brute-force "
                                 "get dataset {0}".format(i))
Iterate datasets, then try guessing numbers
Iterate datasets, then try guessing numbers
Iterate datasets then try guessing numbers
def force_iter_datasets(self):
        found = set()
        for record in self.iter_datasets():
            found.add(int(record['id']))
            yield record
        stop = int(max(int(x) for x in found) * 1.2)
        for i in xrange(1, stop + 1):
            if i in found:
                continue
            try:
                yield self.get_dataset(i)
            except:  
                logger.exception("Exception while trying to brute-force "
                                 "get dataset {0}".format(i))
def force_iter_datasets ( self ) : found = set ( ) for record in self . iter_datasets ( ) : found . add ( int ( record [ 'id' ] ) ) yield record stop = int ( max ( int ( x ) for x in found ) * 1.2 ) for i in xrange ( 1 , stop + 1 ) : if i in found : continue try : yield self . get_dataset ( i ) except : logger . exception ( "Exception while trying to brute-force " "get dataset {0}" . format ( i ) )
Iterate datasets, then try guessing numbers
Iterate datasets then try guessing numbers
"""Iterate datasets, then try guessing numbers""" # Let's try guessing numbers up to 20% more than the highest # id found in the list. # We already returned this one # Simply ignore anything bad that would happen..
self