gen_sign_user_opts: fall back to default account if no account matches sender
authorSascha Silbe <sascha-pgp@silbe.org>
Tue, 18 Jan 2011 18:31:21 +0000 (19:31 +0100)
committerRich Lane <rlane@club.cc.cmu.edu>
Wed, 19 Jan 2011 03:26:46 +0000 (19:26 -0800)
commitf259a4fe71987b5db60ac206bce86b2c69cf2ddc
tree3136288c987a9d3eb8a4834d6f37f092984c08b3
parentabae119526c5c705042679f17b04c39c28b97cb2
gen_sign_user_opts: fall back to default account if no account matches sender

Fixes the following exception:

NoMethodError from thread: main
undefined method `gpgkey' for nil:NilClass
./lib/sup/crypto.rb:226:in `gen_sign_user_opts'
./lib/sup/crypto.rb:48:in `sign'
./lib/sup/util.rb:609:in `send'
./lib/sup/util.rb:609:in `method_missing'
./lib/sup/modes/edit-message-mode.rb:411:in `send'
./lib/sup/modes/edit-message-mode.rb:411:in `build_message'
./lib/sup/modes/edit-message-mode.rb:354:in `send_message'
./lib/sup/mode.rb:59:in `send'
./lib/sup/mode.rb:59:in `handle_input'
./lib/sup/buffer.rb:277:in `handle_input'
bin/sup:260

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
lib/sup/crypto.rb