+ # skip pairs whose value is NULL
+ while capi.lib.notmuch_config_pairs_valid(super()._iter_p):
+ val_p = capi.lib.notmuch_config_pairs_value(super()._iter_p)
+ key_p = capi.lib.notmuch_config_pairs_key(super()._iter_p)
+ if key_p == capi.ffi.NULL:
+ # this should never happen
+ raise errors.NullPointerError
+ key = base.BinString.from_cffi(key_p)
+ capi.lib.notmuch_config_pairs_move_to_next(super()._iter_p)
+ if val_p != capi.ffi.NULL and base.BinString.from_cffi(val_p) != "":
+ return key
+ self._destroy()
+ raise StopIteration