From ed18ff345c52cd0d868b8e26ee23cfcd7711abfd Mon Sep 17 00:00:00 2001 From: Bernard Blackham Date: Sun, 12 Dec 2004 06:54:41 +0000 Subject: [PATCH] dot fix --- sql-edition/servers/Idler.py | 4 ++-- sql-edition/servers/VendingMachine.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sql-edition/servers/Idler.py b/sql-edition/servers/Idler.py index 2670b51..89783e3 100755 --- a/sql-edition/servers/Idler.py +++ b/sql-edition/servers/Idler.py @@ -248,10 +248,10 @@ class FortuneIdler(StringIdler): return 20 class PipeIdler(StringIdler): - def __init__(self, v, command): + def __init__(self, v, command, args): text = "I ate my cookie...." if os.access(command,os.F_OK|os.X_OK): - (stdout, stdin) = popen2.popen2(command) + (stdout, stdin) = popen2.popen2(command+' '+args) text = string.join(stdout.readlines()) stdout.close() stdin.close() diff --git a/sql-edition/servers/VendingMachine.py b/sql-edition/servers/VendingMachine.py index 709b90f..26dc0f2 100644 --- a/sql-edition/servers/VendingMachine.py +++ b/sql-edition/servers/VendingMachine.py @@ -144,6 +144,7 @@ class VendingMachine: def display(self, string): if len(string) > 10: string = string[0:10] + string = re.sub('(.)\.', lambda match: '.'+match.group(1), string) self.wfh.write('D'+string+'\n') (code, string) = self.get_response() return (code == '300', code, string) -- 2.20.1