##// END OF EJS Templates
py3: fix string issues of email message in test-import.t...
Yuya Nishihara -
r37485:9bf65d1b default
parent child Browse files
Show More
@@ -288,10 +288,10 b' override commit message'
288 288 > import email.message, sys
289 289 > msg = email.message.Message()
290 290 > patch = open(sys.argv[1], 'rb').read()
291 > msg.set_payload('email commit message\n' + patch)
291 > msg.set_payload(b'email commit message\n' + patch)
292 292 > msg['Subject'] = 'email patch'
293 293 > msg['From'] = 'email patcher'
294 > open(sys.argv[2], 'wb').write(msg.as_string())
294 > open(sys.argv[2], 'wb').write(bytes(msg))
295 295 > EOF
296 296
297 297
@@ -386,10 +386,10 b" The '---' tests the gitsendmail handling"
386 386 > import email.message, sys
387 387 > msg = email.message.Message()
388 388 > patch = open(sys.argv[1], 'rb').read()
389 > msg.set_payload('email patch\n\nnext line\n---\n' + patch)
389 > msg.set_payload(b'email patch\n\nnext line\n---\n' + patch)
390 390 > msg['Subject'] = '[PATCH] email patch'
391 391 > msg['From'] = 'email patcher'
392 > open(sys.argv[2], 'wb').write(msg.as_string())
392 > open(sys.argv[2], 'wb').write(bytes(msg))
393 393 > EOF
394 394
395 395
General Comments 0
You need to be logged in to leave comments. Login now