From: W. Trevor King Date: Sun, 30 Jun 2013 16:33:48 +0000 (-0400) Subject: feed: Use splitlines() instead of split('\r\n') in Feed.process() X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=744cce341375d8beabe3bd67bdbd21ce8a05db73;p=pycalendar.git feed: Use splitlines() instead of split('\r\n') in Feed.process() The specs require '\r\n', but we don't have to be that strict. --- diff --git a/pycalendar/feed.py b/pycalendar/feed.py index b411d34..e0d2bc3 100644 --- a/pycalendar/feed.py +++ b/pycalendar/feed.py @@ -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))