summaryrefslogtreecommitdiffstats
path: root/ffi
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-05-11 14:48:09 +0200
committerNeal H. Walfield <neal@pep.foundation>2019-05-11 14:48:09 +0200
commit5a2688066b934f73ff4e69640f2bc47211a84451 (patch)
treebc7c83efc28b9df3cfb8b0b1bf0198be623ffcaa /ffi
parentccaccf692688451e984e75b2d020a7077dc15546 (diff)
openpgp: Make {is,possible}_{message,keyring,tpk} return a Result
- PacketParserEOF::is_message, PacketParserEOF::is_keyring, PacketParserEOF::is_tpk, PacketParserResult::possible_message, PacketParserResult::possible_keyring, and PacketParserResult::possible_tpk returned a boolean. - Change them to return a Result<()> instead, which is more Rusty, and, in particular, allows the caller to determine why the message didn't parse.
Diffstat (limited to 'ffi')
-rw-r--r--ffi/lang/python/sequoia/openpgp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi/lang/python/sequoia/openpgp.py b/ffi/lang/python/sequoia/openpgp.py
index ddd76dbe..1c19d80a 100644
--- a/ffi/lang/python/sequoia/openpgp.py
+++ b/ffi/lang/python/sequoia/openpgp.py
@@ -280,7 +280,7 @@ class PacketParserEOF(SQObject):
_del = lib.pgp_packet_parser_eof_free
def is_message(self):
- return bool(lib.pgp_packet_parser_eof_is_message(self.ref()))
+ return invoke(lib.pgp_packet_parser_eof_is_message, self.ref())
class PacketParser(SQObject):
_del = lib.pgp_packet_parser_free