/[gnue]/gnue-appserver/src/geasInstance.py
ViewVC logotype

Diff of /gnue-appserver/src/geasInstance.py

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

revision 1.31 by reinhard, Sun Oct 19 15:39:05 2003 UTC revision 1.32 by reinhard, Sun Oct 19 21:46:17 2003 UTC
# Line 136  class geasInstance: Line 136  class geasInstance:
136    
137      # Reference property: gnue_type is a classname      # Reference property: gnue_type is a classname
138      elif self._classdef.classes.has_key (propertydef.gnue_type):      elif self._classdef.classes.has_key (propertydef.gnue_type):
139        return value        if isinstance (value, types.UnicodeType):
140            # encode unicode values to utf-8 (normal case)
141            return value.encode ('utf-8')
142          elif isinstance (value, types.StringType):
143            # if not UnicodeType then return normal string
144            return value
145          else:
146            raise Exception, ("Database returned invalid value '%s' for " + \
147                              "property '%s'") % (repr (value), propertyname)
148    
149      # TODO: Missing property types:      # TODO: Missing property types:
150      #       * list properties      #       * list properties

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

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