git.ucc.asn.au
/
zanchey
/
dispense2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dot fix
[zanchey/dispense2.git]
/
sql-edition
/
servers
/
VendingMachine.py
diff --git
a/sql-edition/servers/VendingMachine.py
b/sql-edition/servers/VendingMachine.py
index
709b90f
..
26dc0f2
100644
(file)
--- 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)
UCC
git Repository :: git.ucc.asn.au