From 593fbe2fd9e7276a68ed23e07eb66ee664591265 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Wed, 25 Apr 2018 15:55:02 +0300 Subject: [PATCH] Yield support --- CHANGELOG.md | 1 + conflate/conflate.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f082171..bf1dfe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Fixed processing of `''` tag value. * More that 3 duplicate points in a single place are processed correctly. +* Now you can `yield` points from a profile instead of making a list. ## 1.3.2 diff --git a/conflate/conflate.py b/conflate/conflate.py index 25fb659..9e53a02 100755 --- a/conflate/conflate.py +++ b/conflate/conflate.py @@ -975,9 +975,9 @@ def read_dataset(profile, fileobj): return data except Exception: logging.error('Failed to parse the source as a JSON') - return profile.get( + return list(profile.get( 'dataset', args=(fileobj,), - required='returns a list of SourcePoints with the dataset') + required='returns a list of SourcePoints with the dataset')) def add_categories_to_dataset(profile, dataset):