Mercurial > hg-stable
diff 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 |
line wrap: on
line diff
--- a/hgext/patchbomb.py Mon Jan 21 13:37:27 2008 -0200 +++ b/hgext/patchbomb.py Sun Jan 20 14:39:25 2008 +0100 @@ -418,8 +418,7 @@ fp.close() elif opts.get('mbox'): ui.status('Writing ', m['Subject'], ' ...\n') - fp = open(opts.get('mbox'), - m.has_key('In-Reply-To') and 'ab+' or 'wb+') + fp = open(opts.get('mbox'), 'In-Reply-To' in m and 'ab+' or 'wb+') date = util.datestr(date=start_time, format='%a %b %d %H:%M:%S %Y', timezone=False) fp.write('From %s %s\n' % (sender_addr, date))