From 6eeb280e1b5c75ecb462df53f8dc1230a2b1e701 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sat, 3 Feb 2018 23:38:17 -0800 Subject: [PATCH] Put a last line for the warning traceback that's not the string --- daphne/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daphne/server.py b/daphne/server.py index 8132e68..177a79a 100755 --- a/daphne/server.py +++ b/daphne/server.py @@ -6,7 +6,8 @@ if "twisted.internet.reactor" in sys.modules: warnings.warn( "Something has already installed a Twisted reactor. Attempting to uninstall it; " + "you can fix this warning by importing daphne.server early in your codebase or " + - "finding the package that imports Twisted and importing it later on." + "finding the package that imports Twisted and importing it later on.", + UserWarning, ) del sys.modules["twisted.internet.reactor"] asyncioreactor.install()