commit-gnue
[Top][All Lists]
Advanced

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

gnue/common/src GComm.py GConditions.py


From: Arturas Kriukovas
Subject: gnue/common/src GComm.py GConditions.py
Date: Tue, 07 Jan 2003 09:19:12 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Arturas Kriukovas <address@hidden>      03/01/07 09:19:11

Modified files:
        common/src     : GComm.py GConditions.py 

Log message:
        Changed raise _("bla-bla") to tmsg = _("bla-bla"); raise tmsg

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GComm.py.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GConditions.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text

Patches:
Index: gnue/common/src/GComm.py
diff -c gnue/common/src/GComm.py:1.21 gnue/common/src/GComm.py:1.22
*** gnue/common/src/GComm.py:1.21       Wed Jan  1 19:45:41 2003
--- gnue/common/src/GComm.py    Tue Jan  7 09:19:11 2003
***************
*** 44,51 ****
      raise InvalidAdapter, mesg
  
    if not (hasattr(driver,'CLIENT') and driver.CLIENT):
!     raise NoClientAdapter, \
!            _("GComm adapter '%s' does not support clients") % interface
  
    adapter = driver.ClientAdapter(params)
  
--- 44,51 ----
      raise InvalidAdapter, mesg
  
    if not (hasattr(driver,'CLIENT') and driver.CLIENT):
!     tmsg = _("GComm adapter '%s' does not support clients") % interface
!     raise NoClientAdapter, tmsg
  
    adapter = driver.ClientAdapter(params)
  
***************
*** 112,119 ****
        raise InvalidAdapter, mesg
  
      if not (hasattr(driver,'SERVER') and driver.SERVER):
!       raise NoServerAdapter, \
!              _("GComm adapter '%s' does not support servers") % interface
  
      adapter = driver.ServerAdapter(mapping, bindings, params)
      servers[interface] = adapter
--- 112,119 ----
        raise InvalidAdapter, mesg
  
      if not (hasattr(driver,'SERVER') and driver.SERVER):
!       tmsg = _("GComm adapter '%s' does not support servers") % interface
!       raise NoServerAdapter, tmsg
  
      adapter = driver.ServerAdapter(mapping, bindings, params)
      servers[interface] = adapter
Index: gnue/common/src/GConditions.py
diff -c gnue/common/src/GConditions.py:1.22 gnue/common/src/GConditions.py:1.23
*** gnue/common/src/GConditions.py:1.22 Wed Jan  1 19:45:41 2003
--- gnue/common/src/GConditions.py      Tue Jan  7 09:19:11 2003
***************
*** 398,405 ****
  
  def buildPrefixFromTree(conditionTree):
    if type(conditionTree) != types.InstanceType:
!     raise ConditionError, "No valid condition tree"
!   else:        
      otype = string.lower(conditionTree._type[2:])
  
      #
--- 398,406 ----
  
  def buildPrefixFromTree(conditionTree):
    if type(conditionTree) != types.InstanceType:
!     tmsg = _("No valid condition tree")
!     raise ConditionError, tmsg
!   else:
      otype = string.lower(conditionTree._type[2:])
  
      #
***************
*** 413,428 ****
  
      elif otype == 'param':
        return [('param', conditionTree.getValue())]
!           
      #
      #  if its an conditional object, then process it's children
      # 
      elif conditionElements.has_key(otype):
        result=[]
!       
        # first add operator to the list
        result.append((otype,''));  #  ,None));
!       
  
        # change operations with more than there minimal element no into
        # multiple operations with minimal elements
--- 414,429 ----
  
      elif otype == 'param':
        return [('param', conditionTree.getValue())]
! 
      #
      #  if its an conditional object, then process it's children
      # 
      elif conditionElements.has_key(otype):
        result=[]
! 
        # first add operator to the list
        result.append((otype,''));  #  ,None));
! 
  
        # change operations with more than there minimal element no into
        # multiple operations with minimal elements
***************
*** 433,439 ****
               conditionElements[otype][0]):
          paramcount=paramcount-1
          result.append((otype,''));
!               
  
        # then add children
        for i in range(0, len(conditionTree._children)):
--- 434,440 ----
               conditionElements[otype][0]):
          paramcount=paramcount-1
          result.append((otype,''));
! 
  
        # then add children
        for i in range(0, len(conditionTree._children)):
***************
*** 444,465 ****
        #  check for integrity of condition
        #
        if len(conditionTree._children) < conditionElements[otype][0]:
!         raise GConditions.ConditionError, \
!               _('Condition element "%s" expects at least %s arguments; found 
%s') % \
!               (otype, conditionElements[otype][0], 
len(conditionTree._children))            
!       
        if len(conditionTree._children) > conditionElements[otype][1]:
!         raise GConditions.ConditionError, \
!               _('Condition element "%s" expects at most %s arguments; found 
%s') % \
!               (otype, conditionElements[otype][1], 
len(conditionTree._children))
!             
!                         
        # return combination
        return result;
!             
      else:
!       raise GConditions.ConditionNotSupported, \
!             _('Condition clause "%s" is not supported '+
              'by the condition to prefix table conversion.') % otype
!   
  
--- 445,465 ----
        #  check for integrity of condition
        #
        if len(conditionTree._children) < conditionElements[otype][0]:
!         tmsg = _('Condition element "%s" expects at least %s arguments; found 
%s') % \
!                  (otype, conditionElements[otype][0], 
len(conditionTree._children)) 
!         raise GConditions.ConditionError, tmsg
! 
        if len(conditionTree._children) > conditionElements[otype][1]:
!         tmsg = _('Condition element "%s" expects at most %s arguments; found 
%s') % \
!                 (otype, conditionElements[otype][1], 
len(conditionTree._children)) 
!         raise GConditions.ConditionError, tmsg
! 
! 
        # return combination
        return result;
! 
      else:
!       tmsg = _('Condition clause "%s" is not supported '+
              'by the condition to prefix table conversion.') % otype
!       raise GConditions.ConditionNotSupported, tmsg
  




reply via email to

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