(Steve Dougherty)
2013-07-02: Replace split('\n') with splitlines(). Replace split('\n') with splitlines(). Good to know splitlines() exists!
diff --git a/infocalypse/wot.py b/infocalypse/wot.py --- a/infocalypse/wot.py +++ b/infocalypse/wot.py @@ -70,9 +70,7 @@ HG: or putting things below it has the p # (Would that even work?) # TODO: Save message and load later in case sending fails. - # TODO: What if the editor uses different line endings? How to slice - # by-line? Just use .splitlines() - source_lines = source_text.split('\n') + source_lines = source_text.splitlines() # Body is third line and after. msg = MIMEText('\n'.join(source_lines[2:]))