Skip to content

Commit 21f1863

Browse files
committed
Handle the case of pylint returning empty output
1 parent 8f7b447 commit 21f1863

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/py3.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ def py3(check):
3131

3232
echo_info(u"Validating python3 compatibility of {}...".format(check))
3333
cmd = ["pylint", "-f", "json", "--py3k", "-d", "W1618", "--persistent", "no", "--exit-zero", path_to_module]
34-
results = json.loads(run_command(cmd, capture='stdout').stdout)
34+
echo_info(u"\tRunning: {}".format(' '.join(cmd)))
35+
36+
output = run_command(cmd, capture='stdout', check=True).stdout
37+
results = json.loads(output) if output else None
3538

3639
if results:
3740
echo_failure(u"Incompatibilities were found for {}:".format(check))

gearmand/tests/test_integration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from . import common
1010

1111

12+
@pytest.mark.integration
1213
def test_service_check_broken(check, aggregator):
1314
tags = ['server:{}'.format(common.HOST), 'port:{}'.format(common.BAD_PORT)] + common.TAGS2
1415

gearmand/tests/test_integration_e2e.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def assert_metrics(aggregator):
2020
aggregator.assert_all_metrics_covered()
2121

2222

23+
@pytest.mark.integration
2324
@pytest.mark.usefixtures("dd_environment")
2425
def test_metrics(check, aggregator):
2526
check.check(common.INSTANCE)

0 commit comments

Comments
 (0)