##// END OF EJS Templates
py3: add __bytes__() for mq.patchheader and make sure __str__ returns str...
Pulkit Goyal -
r35934:d41e41d1 default
parent child Browse files
Show More
@@ -396,12 +396,14 b' class patchheader(object):'
396 396 self.comments.append('')
397 397 self.comments.append(message)
398 398
399 def __str__(self):
399 def __bytes__(self):
400 400 s = '\n'.join(self.comments).rstrip()
401 401 if not s:
402 402 return ''
403 403 return s + '\n\n'
404 404
405 __str__ = encoding.strmethod(__bytes__)
406
405 407 def _delmsg(self):
406 408 '''Remove existing message, keeping the rest of the comments fields.
407 409 If comments contains 'subject: ', message will prepend
General Comments 0
You need to be logged in to leave comments. Login now