def fetch(self, key): self.create_db_if_needed() with self.cursor() as cursor: cursor.execute(""" select value from hypothesis_data_mapping where key = ? """, (b64encode(key),)) for (value,) in cursor: try: yield b64decode(value) except (binascii.Error, TypeError): pass
def fetch(self, key): self.create_db_if_needed() with self.cursor() as cursor: cursor.execute(""" select value from hypothesis_data_mapping where key = ? """, (b64encode(key),)) for (value,) in cursor: try: yield b64decode(value) except (binascii.Error, TypeError): pass