From: Petr Špaček Date: Mon, 2 Nov 2020 09:26:35 +0000 (+0100) Subject: krprint: nitpick from review X-Git-Tag: v5.2.0~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75c12140c26f10edd5c60a0d53daf54f684ff38e;p=thirdparty%2Fknot-resolver.git krprint: nitpick from review --- diff --git a/NEWS b/NEWS index ff2691e7f..b6d2e4b1f 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ Improvements - improve resiliency against UDP fragmentation attacks (disable PMTUD) (!1061) - ta_update: warn if there are differences between statically configured keys and upstream (#251, !1051) +- human readable output in interactive mode was improved - doc: generate info page (!1079) Bugfixes diff --git a/daemon/lua/krprint.lua b/daemon/lua/krprint.lua index e60880186..24380337c 100644 --- a/daemon/lua/krprint.lua +++ b/daemon/lua/krprint.lua @@ -6,9 +6,10 @@ local base_class = { -- shared constructor: use as serializer_class:new() function base_class.new(class, on_unrepresentable) on_unrepresentable = on_unrepresentable or 'comment' - if not (on_unrepresentable == 'comment' - or on_unrepresentable == 'error') then - error('unsupported val2expr on_unrepresentable option ' .. tostring(on_unrepresentable)) + if on_unrepresentable ~= 'comment' + and on_unrepresentable ~= 'error' then + error('unsupported val2expr on_unrepresentable option ' + .. tostring(on_unrepresentable)) end local inst = {} inst.on_unrepresentable = on_unrepresentable