comparison hgext/hooklib/changeset_obsoleted.py @ 49296:ef5f5f1cbd90

py3: constant-fold some `pycompat.ispy3`
author Manuel Jacob <me@manueljacob.de>
date Tue, 31 May 2022 00:50:29 +0200
parents 6000f5b25c9b
children 5392bf258049
comparison
equal deleted inserted replaced
49295:7fe82a5101c9 49296:ef5f5f1cbd90
112 if b'@' not in sender or b'@localhost' in sender: 112 if b'@' not in sender or b'@localhost' in sender:
113 sender = n.fixmail(sender) 113 sender = n.fixmail(sender)
114 msg['From'] = mail.addressencode(ui, sender, n.charsets, n.test) 114 msg['From'] = mail.addressencode(ui, sender, n.charsets, n.test)
115 msg['To'] = ', '.join(sorted(subs)) 115 msg['To'] = ', '.join(sorted(subs))
116 116
117 msgtext = msg.as_bytes() if pycompat.ispy3 else msg.as_string() 117 msgtext = msg.as_bytes()
118 if ui.configbool(b'notify', b'test'): 118 if ui.configbool(b'notify', b'test'):
119 ui.write(msgtext) 119 ui.write(msgtext)
120 if not msgtext.endswith(b'\n'): 120 if not msgtext.endswith(b'\n'):
121 ui.write(b'\n') 121 ui.write(b'\n')
122 else: 122 else: