commit 1054eea6150331b1215e6871c0b04020b4ba0331 Author: juga0 juga@riseup.net Date: Sun Jul 15 20:36:42 2018 +0000
Check disk space before running scanner --- sbws/core/generate.py | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sbws/core/generate.py b/sbws/core/generate.py index f10ecc1..3c19ed4 100644 --- a/sbws/core/generate.py +++ b/sbws/core/generate.py @@ -5,6 +5,7 @@ from argparse import ArgumentDefaultsHelpFormatter import os import logging from sbws.util.timestamp import now_fname +from ..util.fs import is_low_space
log = logging.getLogger(__name__)
@@ -40,6 +41,8 @@ def gen_parser(sub):
def main(args, conf): os.makedirs(conf.getpath('paths', 'v3bw_dname'), exist_ok=True) + if is_low_space(conf): + exit(1)
datadir = conf.getpath('paths', 'datadir') if not os.path.isdir(datadir):
tor-commits@lists.torproject.org