Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions collectoss/application/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def check_connectivity(urls=["http://chaoss.community", "http://github.com", "ht
def test_connection(function_internet_connection):
@click.pass_context
def new_func(ctx, *args, **kwargs):
# Skip connectivity check for --help
if ctx.params.get('help'):
return ctx.invoke(function_internet_connection, *args, **kwargs)
usage = re.search(r"Usage:\s(.*)\s\[OPTIONS\]", str(ctx.get_usage())).groups()[0]
if not check_connectivity():
print(
Expand All @@ -57,6 +60,9 @@ def new_func(ctx, *args, **kwargs):
def test_db_connection(function_db_connection):
@click.pass_context
def new_func(ctx, *args, **kwargs):
# Skip DB check for --help since help should work without database
if ctx.params.get('help'):
return ctx.invoke(function_db_connection, *args, **kwargs)
engine = DatabaseEngine().engine
usage = re.search(r"Usage:\s(.*)\s\[OPTIONS\]", str(ctx.get_usage())).groups()[0]
try:
Expand Down