Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r34 - in trunk/python/pydok: src/pydok test

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r34 - in trunk/python/pydok: src/pydok test


Chronological Thread 
  • From: "AFS account Roman Geus" <geus AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r34 - in trunk/python/pydok: src/pydok test
  • Date: Fri, 7 Mar 2008 15:36:33 +0100
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: geus
Date: Fri Mar 7 15:36:33 2008
New Revision: 34

Log:
Improved pydok: ClientHandler now support a configurable output stream

Modified:
trunk/python/pydok/src/pydok/handler.py
trunk/python/pydok/test/idok_cgi.py

Modified: trunk/python/pydok/src/pydok/handler.py
==============================================================================
--- trunk/python/pydok/src/pydok/handler.py (original)
+++ trunk/python/pydok/src/pydok/handler.py Fri Mar 7 15:36:33 2008
@@ -113,15 +113,17 @@

TODO: Testing
"""
- def __init__(self, idok_corba):
- """Initalize ClientHandler
+ def __init__(self, idok_corba, file_out):
+ """Initialize ClientHandler

@param idok_corba IdokCorba instance used to initialize CORBA
+ @param file file-like object that the echoMessage method writes to
"""
self.idok_corba = idok_corba
+ self.file_out = file_out
def echoMessage(self, message):
"Print a <message> to the user on the client side"
- sys.stdout.write(message)
+ self.file_out.write(message)
def getCredentials(self, kind, uri, realm):
"""Query credentials from the user that can be used to authenticate
to the DMS repository
"""

Modified: trunk/python/pydok/test/idok_cgi.py
==============================================================================
--- trunk/python/pydok/test/idok_cgi.py (original)
+++ trunk/python/pydok/test/idok_cgi.py Fri Mar 7 15:36:33 2008
@@ -37,7 +37,7 @@
def idok_cli(command):
"Call CLI CORBA service and forward output to sys.stdout"
idok = IdokCorba("dms", "HTTP AT dms.psi.ch")
- clienthandler = ClientHandler_i(idok)
+ clienthandler = ClientHandler_i(idok, sys.stdout)
clienthandler_servant = clienthandler._this()
cli_service = idok.cli_factory_service.create(clienthandler_servant)
cli_service.sendCommand(command)



  • [idok-commit] idok commit r34 - in trunk/python/pydok: src/pydok test, AFS account Roman Geus, 03/07/2008

Archive powered by MHonArc 2.6.19.

Top of Page