Commit 5e339bf4 authored by Matt Traudt's avatar Matt Traudt
Browse files

Better un-initialized error messages

parent 4874f091
......@@ -304,14 +304,14 @@ def main(args, log_):
global log
log = log_
if not is_initted(os.getcwd()):
fail_hard('Directory isn\'t initted')
fail_hard('Sbws isn\'t initialized. Try sbws init', log=log)
if args.threads < 1:
fail_hard('--threads must be larger than 1')
fail_hard('--threads must be larger than 1', log=log)
if args.control[0] not in ['port', 'socket']:
fail_hard('Must specify either control port or socket. '
'Not "{}"'.format(args.control[0]))
'Not "{}"'.format(args.control[0]), log=log)
if args.control[0] == 'port':
args.control[1] = int(args.control[1])
os.makedirs(args.result_directory, exist_ok=True)
......
......@@ -96,7 +96,7 @@ def main(args, log_):
global log
log = log_
if not is_initted(os.getcwd()):
fail_hard('Directory isn\'t initted')
fail_hard('Sbws isn\'t initialized. Try sbws init', log=log)
if not os.path.isdir(args.result_directory):
fail_hard(args.result_directory, 'does not exist')
if args.scale_constant < 1:
......
......@@ -99,7 +99,7 @@ def main(args, log_):
global log
log = log_
if not is_initted(os.getcwd()):
fail_hard('Directory isn\'t initted')
fail_hard('Sbws isn\'t initialized. Try sbws init', log=log)
valid, error_reason = is_good_serverside_password_file(args.password_file)
if not valid:
......
......@@ -56,7 +56,7 @@ def main(args, log_):
global log
log = log_
if not is_initted(os.getcwd()):
fail_hard('Directory isn\'t initted')
fail_hard('Sbws isn\'t initialized. Try sbws init', log=log)
if not os.path.isdir(args.result_directory):
fail_hard(args.result_directory, 'does not exist')
......
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