Skip to content

Commit a7645dd

Browse files
committed
Removed redirect
1 parent 9f30747 commit a7645dd

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

interpreter/core/utils/telemetry.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,15 @@ def send_telemetry(event_name, properties=None):
5050
properties["oi_version"] = pkg_resources.get_distribution(
5151
"open-interpreter"
5252
).version
53-
with open(os.devnull, "w") as f, contextlib.redirect_stdout(
54-
f
55-
), contextlib.redirect_stderr(f):
56-
try:
57-
url = "https://app.posthog.com/capture"
58-
headers = {"Content-Type": "application/json"}
59-
data = {
60-
"api_key": "phc_6cmXy4MEbLfNGezqGjuUTY8abLu0sAwtGzZFpQW97lc",
61-
"event": event_name,
62-
"properties": properties,
63-
"distinct_id": user_id,
64-
}
65-
response = requests.post(url, headers=headers, data=json.dumps(data))
66-
except BaseException as e:
67-
print("Exception", e)
53+
try:
54+
url = "https://app.posthog.com/capture"
55+
headers = {"Content-Type": "application/json"}
56+
data = {
57+
"api_key": "phc_6cmXy4MEbLfNGezqGjuUTY8abLu0sAwtGzZFpQW97lc",
58+
"event": event_name,
59+
"properties": properties,
60+
"distinct_id": user_id,
61+
}
62+
response = requests.post(url, headers=headers, data=json.dumps(data))
63+
except BaseException as e:
64+
print("Exception", e)

0 commit comments

Comments
 (0)