Changeset 116
- Timestamp:
- 04/07/08 15:04:37 (4 years ago)
- Location:
- rdfalchemy/trunk
- Files:
-
- 2 modified
-
rdfalchemy/descriptors.py (modified) (4 diffs)
-
test/sesame2_test.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
rdfalchemy/trunk/rdfalchemy/descriptors.py
r108 r116 146 146 log.debug("SET with descriptor value %s of type %s"%(value,type(value))) 147 147 #setattr(obj, self.name, value) #this recurses indefinatly 148 if isinstance(value,(list,tuple,set)): 149 raise AttributeError("to set an rdfSingle you must pass in a single value") 148 150 obj.__dict__[self.name]= value 149 151 o =value2object(value) … … 180 182 def __set__(self, obj, newvals): 181 183 log.debug("SET with descriptor value %s of type %s"%(newvals,type(newvals))) 182 if not isinstance(newvals, list):183 raise AttributeError("to set a rdfMulti you must pass in a list (it can be a list of one)")184 if not isinstance(newvals, (list,tuple)): 185 raise AttributeError("to set a rdfMultiple you must pass in a list (it can be a list of one)") 184 186 try: 185 187 oldvals = obj.__dict__[self.name] … … 231 233 def __set__(self, obj, newvals): 232 234 log.debug("SET with descriptor value %s of type %s"%(newvals,type(newvals))) 233 if not isinstance(newvals, list):235 if not isinstance(newvals, (list,tuple)): 234 236 raise AttributeError("to set a rdfList you must pass in a list (it can be a list of one)") 235 237 try: … … 301 303 def __set__(self, obj, newvals): 302 304 log.debug("SET with descriptor value %s of type %s"%(newvals,type(newvals))) 303 if not isinstance(newvals, list):305 if not isinstance(newvals, (list,tuple)): 304 306 raise AttributeError("to set a rdfList you must pass in a list (it can be a list of one)") 305 307 seq = obj.db.value(obj.resUri, self.pred) -
rdfalchemy/trunk/test/sesame2_test.py
r108 r116 1 1 from rdfalchemy.sesame2 import SesameGraph 2 2 3 url = 'http://www.openvest.com:8080/ sesame/repositories/Portfolio/'3 url = 'http://www.openvest.com:8080/openrdf-sesame/repositories/Portfolio/' 4 4 g = SesameGraph(url) 5 5 6 q1 = "select ?s ?p ?o where {?s ?p ?o} "6 q1 = "select ?s ?p ?o where {?s ?p ?o} limit 100" 7 7 8 8 responses = {}
