From: Bernard Blackham Date: Sun, 12 Dec 2004 06:54:41 +0000 (+0000) Subject: dot fix X-Git-Tag: IMPORT-FROM-UCCCVS~48 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=ed18ff345c52cd0d868b8e26ee23cfcd7711abfd;p=uccvend-vendserver.git dot fix --- 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)