Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
sbws
Commits
5e339bf4
Commit
5e339bf4
authored
Mar 30, 2018
by
Matt Traudt
Browse files
Better un-initialized error messages
parent
4874f091
Changes
4
Hide whitespace changes
Inline
Side-by-side
sbws/commands/client.py
View file @
5e339bf4
...
...
@@ -304,14 +304,14 @@ def main(args, log_):
global
log
log
=
log_
if
not
is_initted
(
os
.
getcwd
()):
fail_hard
(
'
Directory
isn
\'
t init
ted'
)
fail_hard
(
'
Sbws
isn
\'
t init
ialized. 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
)
...
...
sbws/commands/generate.py
View file @
5e339bf4
...
...
@@ -96,7 +96,7 @@ def main(args, log_):
global
log
log
=
log_
if
not
is_initted
(
os
.
getcwd
()):
fail_hard
(
'
Directory
isn
\'
t init
ted'
)
fail_hard
(
'
Sbws
isn
\'
t init
ialized. 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
:
...
...
sbws/commands/server.py
View file @
5e339bf4
...
...
@@ -99,7 +99,7 @@ def main(args, log_):
global
log
log
=
log_
if
not
is_initted
(
os
.
getcwd
()):
fail_hard
(
'
Directory
isn
\'
t init
ted'
)
fail_hard
(
'
Sbws
isn
\'
t init
ialized. Try sbws init'
,
log
=
log
)
valid
,
error_reason
=
is_good_serverside_password_file
(
args
.
password_file
)
if
not
valid
:
...
...
sbws/commands/stats.py
View file @
5e339bf4
...
...
@@ -56,7 +56,7 @@ def main(args, log_):
global
log
log
=
log_
if
not
is_initted
(
os
.
getcwd
()):
fail_hard
(
'
Directory
isn
\'
t init
ted'
)
fail_hard
(
'
Sbws
isn
\'
t init
ialized. Try sbws init'
,
log
=
log
)
if
not
os
.
path
.
isdir
(
args
.
result_directory
):
fail_hard
(
args
.
result_directory
,
'does not exist'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment