can't readline from a socket
[uccvend-vendserver.git] / sql-edition / servers / VendingMachine.py
index 9fe5245..89dd09e 100644 (file)
@@ -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:]

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