comparison hgext/patchbomb.py @ 5915:d0576d065993

Prefer i in d over d.has_key(i)
author Christian Ebert <blacktrash@gmx.net>
date Sun, 20 Jan 2008 14:39:25 +0100
parents dc6ed2736c81
children 597d8402087d
comparison
equal deleted inserted replaced
5914:8e7796a990c5 5915:d0576d065993
416 raise 416 raise
417 if fp is not ui: 417 if fp is not ui:
418 fp.close() 418 fp.close()
419 elif opts.get('mbox'): 419 elif opts.get('mbox'):
420 ui.status('Writing ', m['Subject'], ' ...\n') 420 ui.status('Writing ', m['Subject'], ' ...\n')
421 fp = open(opts.get('mbox'), 421 fp = open(opts.get('mbox'), 'In-Reply-To' in m and 'ab+' or 'wb+')
422 m.has_key('In-Reply-To') and 'ab+' or 'wb+')
423 date = util.datestr(date=start_time, 422 date = util.datestr(date=start_time,
424 format='%a %b %d %H:%M:%S %Y', timezone=False) 423 format='%a %b %d %H:%M:%S %Y', timezone=False)
425 fp.write('From %s %s\n' % (sender_addr, date)) 424 fp.write('From %s %s\n' % (sender_addr, date))
426 fp.write(m.as_string(0)) 425 fp.write(m.as_string(0))
427 fp.write('\n\n') 426 fp.write('\n\n')