diff --git a/dvc/analytics/__init__.py b/dvc/analytics/__init__.py index 48bced715..23211bb3f 100644 --- a/dvc/analytics/__init__.py +++ b/dvc/analytics/__init__.py @@ -37,15 +37,6 @@ def collect_and_send_report(arguments=None, exit_code=None): subprocess.Popen(["python", "-m", "dvc.analytics", fobj.name]) -def send(path): - url = "https://analytics.dvc.org" - - with open(path) as fobj: - report = json.load(fobj) - - requests.post(url, json=report, timeout=5) - - def is_enabled(): if env2bool("DVC_TEST"): return False @@ -61,6 +52,15 @@ def is_enabled(): return enabled +def send(path): + url = "https://analytics.dvc.org" + + with open(path) as fobj: + report = json.load(fobj) + + requests.post(url, json=report, timeout=5) + + def scm_in_use(): try: scm = SCM(root_dir=Repo.find_root())