From 2f3c7dfe850fb2e1475cd0df38e3033c98c648ea Mon Sep 17 00:00:00 2001 From: IGARASHI Masanao Date: Fri, 24 Apr 2015 22:02:45 +0900 Subject: [PATCH] Fix typo, schema to scheme --- feedgen/entry.py | 10 +++++----- feedgen/feed.py | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/feedgen/entry.py b/feedgen/entry.py index 09ad9bd..6532e27 100644 --- a/feedgen/entry.py +++ b/feedgen/entry.py @@ -138,8 +138,8 @@ class FeedEntry(object): for c in self.__atom_category or []: cat = etree.SubElement(entry, 'category', term=c['term']) - if c.get('schema'): - cat.attrib['schema'] = c['schema'] + if c.get('scheme'): + cat.attrib['scheme'] = c['scheme'] if c.get('label'): cat.attrib['label'] = c['label'] @@ -498,14 +498,14 @@ class FeedEntry(object): set(['term', 'scheme', 'label']), set(['term']) ) # Map the ATOM categories to RSS categories. Use the atom:label as - # name or if not present the atom:term. The atom:schema is the + # name or if not present the atom:term. The atom:scheme is the # rss:domain. self.__rss_category = [] for cat in self.__atom_category: rss_cat = {} rss_cat['value'] = cat['label'] if cat.get('label') else cat['term'] - if cat.get('schema'): - rss_cat['domain'] = cat['schema'] + if cat.get('scheme'): + rss_cat['domain'] = cat['scheme'] self.__rss_category.append( rss_cat ) return self.__atom_category diff --git a/feedgen/feed.py b/feedgen/feed.py index bfe1717..b7ce1c6 100644 --- a/feedgen/feed.py +++ b/feedgen/feed.py @@ -44,7 +44,7 @@ class FeedGenerator(object): self.__atom_link = None # {href*, rel, type, hreflang, title, length} # optional - self.__atom_category = None # {term*, schema, label} + self.__atom_category = None # {term*, scheme, label} self.__atom_contributor = None self.__atom_generator = { 'value' :'python-feedgen', @@ -143,8 +143,8 @@ class FeedGenerator(object): for c in self.__atom_category or []: cat = etree.SubElement(feed, 'category', term=c['term']) - if c.get('schema'): - cat.attrib['schema'] = c['schema'] + if c.get('scheme'): + cat.attrib['scheme'] = c['scheme'] if c.get('label'): cat.attrib['label'] = c['label'] @@ -601,14 +601,14 @@ class FeedGenerator(object): set(['term', 'scheme', 'label']), set(['term']) ) # Map the ATOM categories to RSS categories. Use the atom:label as - # name or if not present the atom:term. The atom:schema is the + # name or if not present the atom:term. The atom:scheme is the # rss:domain. self.__rss_category = [] for cat in self.__atom_category: rss_cat = {} rss_cat['value'] = cat['label'] if cat.get('label') else cat['term'] - if cat.get('schema'): - rss_cat['domain'] = cat['schema'] + if cat.get('scheme'): + rss_cat['domain'] = cat['scheme'] self.__rss_category.append( rss_cat ) return self.__atom_category