commit-gnue
[Top][All Lists]
Advanced

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

gnue/common/src/definitions GParser.py


From: Jason Cater
Subject: gnue/common/src/definitions GParser.py
Date: Thu, 03 Apr 2003 18:30:44 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    03/04/03 18:30:44

Modified files:
        common/src/definitions: GParser.py 

Log message:
        Syncing machines

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/definitions/GParser.py.diff?tr1=1.65&tr2=1.66&r1=text&r2=text

Patches:
Index: gnue/common/src/definitions/GParser.py
diff -c gnue/common/src/definitions/GParser.py:1.65 
gnue/common/src/definitions/GParser.py:1.66
*** gnue/common/src/definitions/GParser.py:1.65 Fri Feb 28 00:55:34 2003
--- gnue/common/src/definitions/GParser.py      Thu Apr  3 18:30:44 2003
***************
*** 189,194 ****
--- 189,195 ----
      self._requiredTags = []
      self._singleInstanceTags = []
      self._tagCounts = {}
+     self.__encoding = gConfig('textEncoding')
  
  
    #
***************
*** 227,233 ****
  
      for element in self._requiredTags:
        if self._tagCounts[element] < 1:
!         tmsg = _("File is missing required tag <%s>") % (element) 
          raise MarkupError, tmsg
  
  
--- 228,234 ----
  
      for element in self._requiredTags:
        if self._tagCounts[element] < 1:
!         tmsg = _("File is missing required tag <%s>") % (element)
          raise MarkupError, tmsg
  
  
***************
*** 267,290 ****
            xmlns[prefix] = attrns
  
          else:
!           
            # Typecasting, anyone?  If attribute should be int, make it an int
            try:
!             attrs[attr] = 
baseAttrs[attr].get('Typecast',GTypecast.text)(saxattrs[qattr].encode(gConfig('textEncoding')))
              loadedxmlattrs[attr] = attrs[attr]
            except KeyError:
              tmsg = _('Error processing <%s> tag [I do not recognize the "%s" 
attribute')\
!                 % (name, attr) 
              raise MarkupError, tmsg
!           
            except UnicodeError:
              tmsg = _('Error processing <%s> tag [Encoding error: invalid 
character in "%s" attribute;]')\
!                 % (name, attr) 
              raise MarkupError, tmsg
  
            except StandardError, msg:
              tmsg = _('Error processing <%s> tag [invalid type for "%s" 
attribute; value is "%s"]')\
!                 % (name, attr, saxattrs[qattr]) 
              raise MarkupError, tmsg
  
            # If this attribute must be unique, check for duplicates
--- 268,292 ----
            xmlns[prefix] = attrns
  
          else:
! 
            # Typecasting, anyone?  If attribute should be int, make it an int
            try:
!             attrs[attr] = 
baseAttrs[attr].get('Typecast',GTypecast.text)(saxattrs[qattr].encode(self.__encoding))
              loadedxmlattrs[attr] = attrs[attr]
            except KeyError:
              tmsg = _('Error processing <%s> tag [I do not recognize the "%s" 
attribute')\
!                 % (name, attr)
              raise MarkupError, tmsg
! 
            except UnicodeError:
              tmsg = _('Error processing <%s> tag [Encoding error: invalid 
character in "%s" attribute;]')\
!                 % (name, attr)
              raise MarkupError, tmsg
  
            except StandardError, msg:
+             raise
              tmsg = _('Error processing <%s> tag [invalid type for "%s" 
attribute; value is "%s"]')\
!                 % (name, attr, saxattrs[qattr])
              raise MarkupError, tmsg
  
            # If this attribute must be unique, check for duplicates




reply via email to

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