]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Improve usability of configwizard statconvert
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 May 2018 16:17:55 +0000 (17:17 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 May 2018 16:17:55 +0000 (17:17 +0100)
lualib/rspamadm/configwizard.lua

index 95febf7193b08462046cc65360b6c9462d96a213..84d7b2d641960b1178baf0fc3187905bb7a102f7 100644 (file)
@@ -439,7 +439,13 @@ return ttl
     local r,ver = get_version(conn)
     if not r then return false end
     if ver ~= 2 then
-      printf("You are using an old schema for %s/%s", symbol_ham, symbol_spam)
+      if not ver then
+        printf('Key "%s_version" has not been found in Redis for %s/%s',
+            symbol_ham)
+      else
+        printf("You are using an old schema version: %s for %s/%s",
+            ver, symbol_ham, symbol_spam)
+      end
       try_convert(true)
     else
       printf("You have configured an old schema for %s/%s but your data has new layout",