Commit 1054eea6 authored by juga's avatar juga Committed by Matt Traudt
Browse files

Check disk space before running scanner

parent 07140b34
......@@ -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):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment