@@ -643,7 +643,7 @@ def _get_xslt_pi(self):
643
643
return etree .tostring (etree .ProcessingInstruction (
644
644
"xml-stylesheet" ,
645
645
'type="text/xsl" href="' + quote_sanitized + '"' ,
646
- ), encoding = str )
646
+ ), encoding = "UTF-8" ). decode ( "UTF-8" )
647
647
648
648
def __str__ (self ):
649
649
"""Print the podcast in RSS format, using the default options.
@@ -660,12 +660,12 @@ def rss_str(self, minimize=False, encoding='UTF-8',
660
660
lines and adding properly indentation, saving bytes at the cost of
661
661
readability (default: False).
662
662
:type minimize: bool
663
- :param encoding: Encoding used in the XML file (default: UTF-8).
663
+ :param encoding: Encoding used in the XML declaration (default: UTF-8).
664
664
:type encoding: str
665
665
:param xml_declaration: Whether an XML declaration should be added to
666
666
the output (default: True).
667
667
:type xml_declaration: bool
668
- :returns: The generated RSS feed as a :obj:`str`.
668
+ :returns: The generated RSS feed as a :obj:`str` (unicode in 2.7)
669
669
"""
670
670
feed = self ._create_rss ()
671
671
rss = etree .tostring (feed , pretty_print = not minimize , encoding = encoding ,
@@ -1133,7 +1133,7 @@ def skip_days(self, days):
1133
1133
if not d .lower () in ['monday' , 'tuesday' , 'wednesday' , 'thursday' ,
1134
1134
'friday' , 'saturday' , 'sunday' ]:
1135
1135
raise ValueError ('Invalid day %s' % d )
1136
- self .__skip_days = { day .capitalize () for day in days }
1136
+ self .__skip_days = set ( day .capitalize () for day in days )
1137
1137
else :
1138
1138
self .__skip_days = None
1139
1139
0 commit comments