commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/gnue-common/src/commdrivers GCommBase.py _...


From: Jason Cater
Subject: gnue/gnue-common/src/commdrivers GCommBase.py _...
Date: Wed, 28 Nov 2001 23:40:39 -0500

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    01/11/28 23:40:39

Modified files:
        gnue-common/src/commdrivers: GCommBase.py 
        gnue-common/src/commdrivers/_helpers: AsyncSocketServer.py 
        gnue-common/src/commdrivers/xmlrpc: CommDriver.py 

Log message:
        synching machines

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/GCommBase.py.diff?cvsroot=OldCVS&tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/_helpers/AsyncSocketServer.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py.diff?cvsroot=OldCVS&tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: gnue/gnue-common/src/commdrivers/GCommBase.py
diff -u gnue/gnue-common/src/commdrivers/GCommBase.py:1.6 
gnue/gnue-common/src/commdrivers/GCommBase.py:1.7
--- gnue/gnue-common/src/commdrivers/GCommBase.py:1.6   Sun Nov  4 13:34:37 2001
+++ gnue/gnue-common/src/commdrivers/GCommBase.py       Wed Nov 28 23:40:39 2001
@@ -39,10 +39,10 @@
   def runMethod(self, method, params):
     pass
 
-  def getAttribute(self, attribute
+  def getAttribute(self, attribute):
     pass
 
-  def setAttribute(self, attribute
+  def setAttribute(self, attribute):
     pass
 
   # Try to shut our services down
@@ -65,5 +65,36 @@
   def __init__(self, adapter, parent=None, **params):
     for param in params.keys():
       self.__dict__["_%s" % param] = params[param]
-    self._adapter = adapter
-    self._parent = parent
+    self.__adapter = adapter
+    self.__parent = parent
+    try:
+      self._subobject = params['subobject']
+    else:
+      self._subobject = 0
+
+
+  def __getattr__(self, attr, value):
+    try:
+      if attr[0] == '_':
+        return AttributeError, attr
+      else:
+        try:
+          return self.__dict__[attr]
+        except KeyError:
+          po = self.__class__(self._adapters, self, attr_name=attr, 
subobject=1)
+          self.__dict__[attr] = po
+          return po
+
+    except KeyError, mesg:
+      raise AttributeError, mesg
+
+  def __setattr__(self, attr, value):
+    if attr[0] == '_':
+      self.__dict__[attr] == value
+    else:
+      # TODO
+      pass
+
+  def __call__(self, *args, **params):
+    self._server.runMethod(self, args, params):
+
Index: gnue/gnue-common/src/commdrivers/_helpers/AsyncSocketServer.py
diff -u gnue/gnue-common/src/commdrivers/_helpers/AsyncSocketServer.py:1.1 
gnue/gnue-common/src/commdrivers/_helpers/AsyncSocketServer.py:1.2
--- gnue/gnue-common/src/commdrivers/_helpers/AsyncSocketServer.py:1.1  Mon Nov 
26 15:35:10 2001
+++ gnue/gnue-common/src/commdrivers/_helpers/AsyncSocketServer.py      Wed Nov 
28 23:40:39 2001
@@ -19,12 +19,15 @@
 # Copyright 2001 Free Software Foundation
 #
 # FILE:
-# AioSocketServer.py
+# AsyncSocketServer
 #
 # DESCRIPTION:
-# Class that implements a AIO-based socket server (http).
+# Set of classes that implement a Asynchronios IO-based socket server.
 #
 # NOTES:
+# These socket servers do their magic without threads or forking.
+# Pretty cool, eh?
+#
 
 from gnue.common.commdrivers import GCommBase
 
@@ -35,7 +38,7 @@
     GCommBase.Server.__init__(self)
 
 
-class AsyncHTTPServer(AsyncSocketServer): 
+class AsyncHTTPServer(AsyncSocketServer):
   pass
 
 
Index: gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py
diff -u gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py:1.5 
gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py:1.6
--- gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py:1.5   Mon Nov 26 
15:35:11 2001
+++ gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py       Wed Nov 28 
23:40:39 2001
@@ -114,13 +114,6 @@
 #
 class _ProxyObject(GCommBase.ProxyObject):
 
-  def __getattr__(self, attr):
-    self.__dict__[attr] = _ProxyObject(self._server, self, name=attr)
-    return self.__dict__[attr]
-
-  def __call__(self, *args, **params):
-    self._server.runMethod(self, args, params):
-
   # Server raised an exception...
   # Translate the exception into a local python
   # exception and raise it...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]