dot fix
authorBernard Blackham <[email protected]>
Sun, 12 Dec 2004 06:54:41 +0000 (06:54 +0000)
committerBernard Blackham <[email protected]>
Sun, 12 Dec 2004 06:54:41 +0000 (06:54 +0000)
sql-edition/servers/Idler.py
sql-edition/servers/VendingMachine.py

index 2670b51..89783e3 100755 (executable)
@@ -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()
index 709b90f..26dc0f2 100644 (file)
@@ -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)

UCC git Repository :: git.ucc.asn.au