From e67833a39f83ec42da6537f0906ed07a50dc8747 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 25 Aug 2013 05:55:10 -0400 Subject: [PATCH] Mod thread.ident by 10,000 for when they're absurdly large. --- earwigbot/commands/threads.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/earwigbot/commands/threads.py b/earwigbot/commands/threads.py index 9ac8b09..564ab7e 100644 --- a/earwigbot/commands/threads.py +++ b/earwigbot/commands/threads.py @@ -71,10 +71,10 @@ class Threads(Command): tname = thread.name if tname == "MainThread": t = "\x0302MainThread\x0F (id {0})" - normal_threads.append(t.format(thread.ident)) + normal_threads.append(t.format(thread.ident % 10000)) elif tname in self.config.components: t = "\x0302{0}\x0F (id {1})" - normal_threads.append(t.format(tname, thread.ident)) + normal_threads.append(t.format(tname, thread.ident % 10000)) elif tname.startswith("reminder"): tname = tname.replace("reminder ", "") t = "\x0302reminder\x0F (until {0})" @@ -82,7 +82,7 @@ class Threads(Command): else: tname, start_time = re.findall("^(.*?) \((.*?)\)$", tname)[0] t = "\x0302{0}\x0F (id {1}, since {2})" - daemon_threads.append(t.format(tname, thread.ident, + daemon_threads.append(t.format(tname, thread.ident % 10000, start_time)) if daemon_threads: