changeset 7095:0ed11838bd1a

patchbomb: consistently use opts.get
author Christian Ebert <blacktrash@gmx.net>
date Tue, 07 Oct 2008 13:57:00 +0200
parents a4769dec7773
children 6dab29f6df37
files hgext/patchbomb.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Sun Oct 12 19:21:07 2008 -0500
+++ b/hgext/patchbomb.py	Tue Oct 07 13:57:00 2008 +0200
@@ -159,7 +159,7 @@
         if not node:
             raise ValueError
 
-        if opts['attach']:
+        if opts.get('attach'):
              body = ('\n'.join(desc[1:]).strip() or
                    'Patch subject is complete summary.')
              body += '\n\n\n'
@@ -190,7 +190,7 @@
             else:
                 patchname = cmdutil.make_filename(repo, '%b.patch', binnode)
             disposition = 'inline'
-            if opts['attach']:
+            if opts.get('attach'):
                 disposition = 'attachment'
             p['Content-Disposition'] = disposition + '; filename=' + patchname
             msg.attach(p)