/[papo]/gnue/common/src/commdrivers/_directory/DirectoryServer.py
ViewVC logotype

Diff of /gnue/common/src/commdrivers/_directory/DirectoryServer.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by styxman, Fri Nov 15 15:32:55 2002 UTC revision 1.4.2.1 by anthonyl, Tue Mar 4 22:09:32 2003 UTC
# Line 16  Line 16 
16  # write to the Free Software Foundation, Inc., 59 Temple Place  # write to the Free Software Foundation, Inc., 59 Temple Place
17  # - Suite 330, Boston, MA 02111-1307, USA.  # - Suite 330, Boston, MA 02111-1307, USA.
18  #  #
19  # Copyright 2001 Free Software Foundation  # Copyright 2001-2003 Free Software Foundation
20  #  #
21  # FILE:  # FILE:
22  # DirectoryServer.py  # DirectoryServer.py
# Line 139  class DirectoryServer(GCommBase.Server): Line 139  class DirectoryServer(GCommBase.Server):
139              GDebug.printMesg(8,'* %s is bound to \n * %s' % \              GDebug.printMesg(8,'* %s is bound to \n * %s' % \
140                               (object._path,object._realbinding))                                       (object._path,object._realbinding))        
141            except:            except:
142              raise AttributeError, \              tmsg = _("GNURPC can't bind service '%s' to service '%s'") %\
143                    _("GNURPC can't bind service '%s' to service '%s'") %\                    (object.name,parent.name)  
144                    (object.name,parent.name)              raise AttributeError, tmsg
145          elif parent._type == 'RpGnuRpc':          elif parent._type == 'RpGnuRpc':
146            pass            pass
147          else:          else:
148            raise AttributeError, \            tmsg = _("GNURPC: cannot bind service '%s' to %s") %\
                 _("GNURPC: cannot bind service '%s' to %s") %\  
149                  (object.name,parent._type)                  (object.name,parent._type)
150              raise AttributeError, tmsg
151                        
152    
153      # Compute binding for methods and for attributs      # Compute binding for methods and for attributs
# Line 168  class DirectoryServer(GCommBase.Server): Line 168  class DirectoryServer(GCommBase.Server):
168              GDebug.printMesg(8,'* %s is bound to \n * %s' % \              GDebug.printMesg(8,'* %s is bound to \n * %s' % \
169                               (object._path,bindto))                               (object._path,bindto))
170            except:            except:
171              raise AttributeError, \              tmsg = _("GNURPC can't bind method/attribut '%s' to service '%s'") %\
172                        _("GNURPC can't bind method/attribut '%s' to service '%s'") %\                        (object.name,parent.name)  
173                        (object.name,parent.name)              raise AttributeError, tmsg
174              pass              pass
175          else:          else:
176            bindto=None            bindto=None
# Line 302  class DirectoryServer(GCommBase.Server): Line 302  class DirectoryServer(GCommBase.Server):
302        signature=direntry['signature']        signature=direntry['signature']
303    
304        if (server_method==None) and (server_attribute==None):        if (server_method==None) and (server_attribute==None):
305          raise AttributeError, \          tmsg = _("Server XML-RPC method '%s' is not ") % method +\
306                _("Server XML-RPC method '%s' is not ") % method +\                 _("bound to real method")
307                _("bound to real method")          raise AttributeError, tmsg
308                
309      except KeyError:      except KeyError:
310        raise AttributeError, \        tmsg = _("Server does not have XML-RPC ") +\
311                _("Server does not have XML-RPC ") +\               _("procedure %s") % method
312                _("procedure %s") % method        raise AttributeError, tmsg
313            
314      self.checkParamsAgainstSignature(signature,params)      self.checkParamsAgainstSignature(signature,params)
315            
# Line 349  class DirectoryServer(GCommBase.Server): Line 349  class DirectoryServer(GCommBase.Server):
349        # getAttribut method        # getAttribut method
350        return server_attribute        return server_attribute
351      else:      else:
352        raise AttributeError, \        tmsg = _("Internal Server XML-RPC error: method type") +\
353              _("Internal Server XML-RPC error: method type") +\               _("(get/set attribute) couldn't be detected (method %s)") \
354              _("(get/set attribute) couldn't be detected (method %s)") \               % method  
355              % method              raise AttributeError, tmsg
356    
357    
358    #    #
# Line 364  class DirectoryServer(GCommBase.Server): Line 364  class DirectoryServer(GCommBase.Server):
364        # TODO:  Compare submitted attributs with signature        # TODO:  Compare submitted attributs with signature
365        pass        pass
366      except KeyError:      except KeyError:
367          raise AttributeError, \          tmsg = _("Server XML-RPC ") +\
368                _("Server XML-RPC ") +\                 _("procedure %s accepts just %s as attributs") % (method,attr)
369                _("procedure %s accepts just %s as attributs") % (method,attr)          raise AttributeError, tmsg
370            
371    
372    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26