Skip to content

Commit

Permalink
Skip items with no taxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Jul 29, 2015
1 parent 56a7dcc commit 3c151c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion transmogrify/wordpress/blueprints/csvsource.py
Expand Up @@ -155,7 +155,13 @@ def __iter__(self):
item_id = item['title'] = url.path.split('/')[-1]
item_id = unquote_plus(item_id).decode('utf-8').encode('ascii', 'ignore')

category, tags = self.taxonomies[row['ID']]
try:
category, tags = self.taxonomies[row['ID']]
except KeyError:
# files defining taxonomies are probably outdated
logger.warn('No taxonomies found for row ID: ' + row['ID'])
continue

date = item['creation_date'] = DateTime(row['post_date_gmt'])
item['modification_date'] = DateTime(row['post_modified_gmt'])

Expand Down

0 comments on commit 3c151c9

Please sign in to comment.