]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
version check: small fix - missing import and wording
authorJason Ish <jason.ish@oisf.net>
Fri, 11 Oct 2019 14:49:34 +0000 (08:49 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 11 Oct 2019 15:17:04 +0000 (09:17 -0600)
- import sys was missing cause sys.exit to throw an
  exception

- if the index does not contain a version, suggest the
  user run update-sources.

suricata/update/sources.py

index 78b5cbb55b668af1945bf1e2a268a09f63456c56..1cef09b5a3b97e0301f6bb33557ee4fe50931b7a 100644 (file)
@@ -16,6 +16,7 @@
 
 from __future__ import print_function
 
+import sys
 import os
 import logging
 import io
@@ -134,7 +135,7 @@ class Index:
         try:
             return self.index["versions"]
         except KeyError:
-            logger.error("Version information not in index")
+            logger.error("Version information not in index. Please update with suricata-update update-sources.")
             sys.exit(1)
 
 def load_source_index(config):