From 1433a02499f046cd0bc1b3d628d9fd4ebc38f17f Mon Sep 17 00:00:00 2001 From: Mark Tearle Date: Mon, 8 Dec 2014 23:55:24 +0800 Subject: [PATCH] BUGFIX: FIx up strings in idler --- VendServer/Idler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VendServer/Idler.py b/VendServer/Idler.py index 5b66455..3a8aced 100755 --- a/VendServer/Idler.py +++ b/VendServer/Idler.py @@ -283,7 +283,7 @@ class FortuneIdler(StringIdler): text = "I broke my wookie...." if os.access(fortune,os.F_OK|os.X_OK): (lines, unused) = Popen((fortune,), close_fds=True, stdout=PIPE).communicate() - text = string.join(lines) + text = lines.replace('\n', ' ').replace('\r', '') StringIdler.__init__(self, v, text,repeat=False) def affinity(self): @@ -294,7 +294,7 @@ class PipeIdler(StringIdler): text = "I ate my cookie...." if os.access(command,os.F_OK|os.X_OK): (lines, unused) = Popen([command,] + args.split(), close_fds=True, stdout=PIPE).communicate() - text = string.join(lines) + text = lines.replace('\n', ' ').replace('\r', '') StringIdler.__init__(self, v, text,repeat=False) def affinity(self): -- 2.20.1