commit 7aaf0a5b4342840ae07827d3becfcd45b6351a01 Author: juga0 juga@riseup.net Date: Sun Jul 15 20:37:02 2018 +0000
Check disk space before running generate --- sbws/core/scanner.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/sbws/core/scanner.py b/sbws/core/scanner.py index 0fe7908..8b13816 100644 --- a/sbws/core/scanner.py +++ b/sbws/core/scanner.py @@ -21,6 +21,9 @@ import logging import requests import random
+from ..util.fs import is_low_space + + rng = random.SystemRandom() end_event = Event() log = logging.getLogger(__name__) @@ -377,6 +380,9 @@ def gen_parser(sub):
def main(args, conf): + if is_low_space(conf): + exit(1) + if conf.getint('scanner', 'measurement_threads') < 1: fail_hard('Number of measurement threads must be larger than 1')