Rev 207: Simplified canonicalisation of line endings, as per John's review comments. in http://bzr.daniel-watkins.co.uk/pqm/xmlrpc

Daniel Watkins daniel at daniel-watkins.co.uk
Thu Aug 7 02:34:11 BST 2008


At http://bzr.daniel-watkins.co.uk/pqm/xmlrpc

------------------------------------------------------------
revno: 207
revision-id: daniel at daniel-watkins.co.uk-20080807013206-p7yx2610y00ht8dh
parent: daniel at daniel-watkins.co.uk-20080801010152-y7lskmc4fqy6vc8o
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: xmlrpc
timestamp: Thu 2008-08-07 02:32:06 +0100
message:
  Simplified canonicalisation of line endings, as per John's review comments.
-------------- next part --------------
=== modified file 'pqm/script.py'
--- a/pqm/script.py	2008-07-31 06:17:16 +0000
+++ b/pqm/script.py	2008-08-07 01:32:06 +0000
@@ -91,7 +91,7 @@
                                    options.keyring)
         open(transaction_file, 'a').write(sigid + '\n')
     # canonicalize line endings
-    body = '\n'.join(re.split('\r?\n', msg))
+    body = msg.replace('\r\n', '\n')
     return ("From: %(sender)s\n"
             "Subject: %(subject)s\n"
             "%(body)s" % {'sender': sender,



More information about the bazaar-commits mailing list