Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3 #2964

Merged
merged 2 commits into from
Jan 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 4 deletions tcp_check/datadog_checks/tcp_check/tcp_check.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)

# stdlib
import socket
import time

# project
from datadog_checks.base import ensure_unicode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will require pinning base check to >= 4.2.0

from datadog_checks.checks import NetworkCheck, Status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're pinning, let's import from the base submodule



Expand Down Expand Up @@ -106,7 +104,7 @@ def _check(self, instance):
return Status.UP, "UP"

def report_as_service_check(self, sc_name, status, instance, msg=None):
instance_name = self.normalize(instance['name'])
instance_name = ensure_unicode(self.normalize(instance['name']))
host = instance.get('host', None)
port = instance.get('port', None)
custom_tags = instance.get('tags', [])
Expand Down
4 changes: 1 addition & 3 deletions tcp_check/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
minversion = 2.0
basepython = py27
envlist =
unit
{py27,py36}-unit
flake8

[testenv]
usedevelop = true
platform = linux2|darwin|windows

[testenv:unit]
deps =
-e../datadog_checks_base[deps]
-rrequirements-dev.txt
Expand Down