options are always present

This commit is contained in:
Benjamin Dauvergne 2012-05-10 14:10:31 +00:00
parent a9471920c5
commit c37e85af2b
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ In case of failure the following return value is returned:
raise CommandError('Not found')
try:
if 'file' in options:
if options.get('file'):
mail = email.message_from_file(file(options['file']))
else:
mail = email.message_from_file(sys.stdin)