diff options
| author | userimack <mahendra.k12@gmail.com> | 2016-01-23 22:17:07 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-25 14:23:43 -0500 |
| commit | 60586dd7379b295b72d8af4e03423c286913b5e8 (patch) | |
| tree | 6f834957ea76305fbcda40e23e836077890d36b8 /django/utils/feedgenerator.py | |
| parent | abc0777b63057e2ff97eee2ff184356051e14c47 (diff) | |
Fixed #26125 -- Fixed E731 flake warnings.
Diffstat (limited to 'django/utils/feedgenerator.py')
| -rw-r--r-- | django/utils/feedgenerator.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index 3fae71cdee..367245be22 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -91,7 +91,8 @@ class SyndicationFeed(object): def __init__(self, title, link, description, language=None, author_email=None, author_name=None, author_link=None, subtitle=None, categories=None, feed_url=None, feed_copyright=None, feed_guid=None, ttl=None, **kwargs): - to_unicode = lambda s: force_text(s, strings_only=True) + def to_unicode(s): + return force_text(s, strings_only=True) if categories: categories = [force_text(c) for c in categories] if ttl is not None: @@ -126,7 +127,8 @@ class SyndicationFeed(object): objects, and enclosures, which is an iterable of instances of the Enclosure class. """ - to_unicode = lambda s: force_text(s, strings_only=True) + def to_unicode(s): + return force_text(s, strings_only=True) if categories: categories = [to_unicode(c) for c in categories] if ttl is not None: |
