Skip to content

Commit 9a25bdf

Browse files
picklelomasenf
authored andcommitted
Suppress runtime warnings (#3354)
1 parent 83a4e54 commit 9a25bdf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

reflex/utils/telemetry.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import asyncio
66
import multiprocessing
77
import platform
8+
import warnings
89

910
try:
1011
from datetime import UTC, datetime
@@ -192,6 +193,7 @@ async def async_send(event, telemetry_enabled, **kwargs):
192193
asyncio.create_task(async_send(event, telemetry_enabled, **kwargs))
193194
except RuntimeError:
194195
# If there is no event loop, send the event synchronously.
196+
warnings.filterwarnings("ignore", category=RuntimeWarning)
195197
_send(event, telemetry_enabled, **kwargs)
196198

197199

0 commit comments

Comments
 (0)