X-Git-Url: https://git.ucc.asn.au/?p=zanchey%2Fdispense2.git;a=blobdiff_plain;f=sql-edition%2Fservers%2FVendingMachine.py;h=d86cc3f2635ae0effe09cc4c4405afc976d4c57c;hp=9fe524519e7666579c09245f6110fbcc0050fe24;hb=eb939cac2cad4939bc75dbaad0a39c2b3b499c49;hpb=753f7f6d9b81b406cdb9b5d48fbbf2005fead1a7 diff --git a/sql-edition/servers/VendingMachine.py b/sql-edition/servers/VendingMachine.py index 9fe5245..d86cc3f 100644 --- a/sql-edition/servers/VendingMachine.py +++ b/sql-edition/servers/VendingMachine.py @@ -62,7 +62,8 @@ class VendingMachine: s = '' while s == '': s = self.rfh.readline() - if s == '': return None + if s == '': + raise VendingException('Input socket has closed!') s = s.strip('\r\n') code = s[0:3] text = s[4:]