[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [sbws/master] Check disk space before running generate
commit 7aaf0a5b4342840ae07827d3becfcd45b6351a01
Author: juga0 <juga@xxxxxxxxxx>
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')
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits