From 6ce979a7de6ffe48b5d44013483db84e0e024c5b Mon Sep 17 00:00:00 2001 From: Nathan Petrangelo Date: Mon, 5 Jun 2023 17:31:52 -0400 Subject: [PATCH] Update __init__.py Auto convert log messages to strings on the way in --- RNS/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/__init__.py b/RNS/__init__.py index 965cedb..977d88d 100755 --- a/RNS/__init__.py +++ b/RNS/__init__.py @@ -105,7 +105,7 @@ def timestamp_str(time_s): def log(msg, level=3, _override_destination = False): global _always_override_destination, compact_log_fmt - + msg = str(msg) if loglevel >= level: if not compact_log_fmt: logstring = "["+timestamp_str(time.time())+"] ["+loglevelname(level)+"] "+msg @@ -238,4 +238,4 @@ def panic(): def exit(): print("") - sys.exit(0) \ No newline at end of file + sys.exit(0)