summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'bindings')
-rw-r--r--bindings/solv.i5
1 files changed, 2 insertions, 3 deletions
diff --git a/bindings/solv.i b/bindings/solv.i
index 23e7f20..3f88a8b 100644
--- a/bindings/solv.i
+++ b/bindings/solv.i
@@ -2001,9 +2001,8 @@ rb_eval_string(
#endif
const char *__str__() {
KeyValue kv = $self->kv;
- if (!repodata_stringify($self->pool, $self->data, $self->key, &kv, SEARCH_FILES | SEARCH_CHECKSUMS))
- return "";
- return kv.str;
+ const char *str = repodata_stringify($self->pool, $self->data, $self->key, &kv, SEARCH_FILES | SEARCH_CHECKSUMS);
+ return str ? str : "";
}
}