notice when there isn't gpg data available
authorAndrew Engelbrecht <sudoman@ninthfloor.org>
Tue, 21 Jul 2015 23:51:51 +0000 (19:51 -0400)
committerAndrew Engelbrecht <sudoman@ninthfloor.org>
Mon, 7 Dec 2015 18:28:39 +0000 (13:28 -0500)
which happens when gpg doesn't get valid or complete input

edward

diff --git a/edward b/edward
index 8fa5d331ebf1a23a989dde7cd5b4dcc4170642fe..cc0469fd7cbf6264039c94fcef04dc3318ac8e62 100755 (executable)
--- a/edward
+++ b/edward
@@ -306,6 +306,8 @@ def flatten_payload_pieces (eddy_obj, _ignore):
     for piece in eddy_obj.payload_pieces:
         if piece.piece_type == "text":
             string += piece.string
+        elif piece.gpg_data == None:
+            string += "Hmmm... I wasn't able to get that part.\n"
         elif piece.piece_type == "message":
             # recursive!
             string += flatten_eddy(piece.gpg_data.plainobj)