diff options
author | Stanislav Ochotnicky <sochotnicky@gmail.com> | 2009-07-07 23:38:59 +0200 |
---|---|---|
committer | Stanislav Ochotnicky <sochotnicky@gmail.com> | 2009-07-07 23:56:52 +0200 |
commit | 5cf20a51008f9c3a7850aaedc7b58ac2889cdc58 (patch) | |
tree | 1e083a56a87401d400f40d9b1c4060d773c2af23 /src/matchbox/__init__.py | |
parent | Changed to protocol and added documentation (diff) | |
download | collagen-5cf20a51008f9c3a7850aaedc7b58ac2889cdc58.tar.gz collagen-5cf20a51008f9c3a7850aaedc7b58ac2889cdc58.tar.bz2 collagen-5cf20a51008f9c3a7850aaedc7b58ac2889cdc58.zip |
Changed matchbox according to new protocol
Diffstat (limited to 'src/matchbox/__init__.py')
-rw-r--r-- | src/matchbox/__init__.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/matchbox/__init__.py b/src/matchbox/__init__.py index e263c19..ea65810 100644 --- a/src/matchbox/__init__.py +++ b/src/matchbox/__init__.py @@ -21,7 +21,7 @@ class MatchboxServer(object): return None self.sock.bind((self.host, self.port)) self.sock.listen(5) - + while 1: client_socket, address = self.sock.accept() print "connection from: ", address @@ -55,16 +55,17 @@ class MatchboxServer(object): repl = protocol.GetNextPackageReply('games-misc/fortune-mod-cs','1.6.9','-unicode') client_socket.sendall(pickle.dumps(repl)) elif type(command) is protocol.AddPackageInfo: - print "adding package info" - print command.package_info.name - print command.package_info.version - print command.package_info.use_flags - print command.package_info.emerge_info - print command.package_info.build_log - print command.package_info.build_env - - print len(command.package_info.content) - print command.package_info.content.keys() + for pi in command.package_infos: + print "adding package info" + print pi.name + print pi.version + print pi.use_flags + print pi.emerge_info + print pi.build_log + print pi.build_env + + print len(pi.content) + print pi.content.keys() # TODO else: print "unknown command: %s" % command |