feed: Use splitlines() instead of split('\r\n') in Feed.process()
authorW. Trevor King <wking@tremily.us>
Sun, 30 Jun 2013 16:33:48 +0000 (12:33 -0400)
committerW. Trevor King <wking@tremily.us>
Sun, 30 Jun 2013 20:24:23 +0000 (16:24 -0400)
The specs require '\r\n', but we don't have to be that strict.

pycalendar/feed.py

index b411d34fa09510706f7047b66a9a507ff1904974..e0d2bc3e045833e9d14d0a43b8317331a75a1a0f 100644 (file)
@@ -121,7 +121,7 @@ class Feed (set):
             self, len(self.content)))
         entry = None
         stack = []
-        for i,line in enumerate(self.content.split('\r\n')):
+        for i,line in enumerate(self.content.splitlines()):
             if line.startswith('BEGIN:'):
                 _type = line.split(':', 1)[1]
                 _LOG.info('{!r}: begin {}'.format(self, _type))