From: Mark Tearle Date: Mon, 8 Dec 2014 15:55:24 +0000 (+0800) Subject: BUGFIX: FIx up strings in idler X-Git-Url: https://git.ucc.asn.au/?p=uccvend-vendserver.git;a=commitdiff_plain;h=1433a02499f046cd0bc1b3d628d9fd4ebc38f17f;hp=a214f628990959280fecbc39743d1931466b8321 BUGFIX: FIx up strings in idler --- 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):