added support for multiple files in the client and made the file reading less memory intensive for the server (poorly, mind you)

This commit is contained in:
jchu 2004-09-02 21:15:10 +00:00
parent 2423a686d6
commit a4710414e0
2 changed files with 17 additions and 8 deletions

View file

@ -121,14 +121,16 @@ def main(argv=None):
usage()
return 1
try:
fil = ClientFile(argv[1])
except IOError, err:
print "Error: " + err.strerror + ": '" + err.filename + "'"
usage()
return 1
files = []
for i in argv[1:]:
try:
files.append(ClientFile(i))
except IOError, err:
print "Error: " + err.strerror + ": '" + err.filename + "'"
usage()
return 1
cs = ClientSocket([fil], 'localhost', 1034, "bfinch@example.net", "B0b")
cs = ClientSocket(files, 'localhost', 1034, "bfinch@example.net", "B0b")
cs.connect()
if not cs.auth():