~jkakar/storm/better-timeout-messages

« back to all changes in this revision

Viewing changes to storm/references.py

  • Committer: James Henstridge
  • Date: 2010-02-08 11:36:58 UTC
  • mfrom: (340.1.2 storm.bug-394428)
  • Revision ID: james@jamesh.id.au-20100208113658-0a89ya5sam1gb5s1
Disallow setting a ReferenceSet attribute.

Previously setting a ReferenceSet attribute succeeded, but did not 
update the reference set, which could hide bugs.
[r=jkakar,therve] [f=394428]

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#
21
21
import weakref
22
22
 
23
 
from storm.exceptions import WrongStoreError, NoStoreError, ClassInfoError
 
23
from storm.exceptions import (
 
24
    ClassInfoError, FeatureError, NoStoreError, WrongStoreError)
24
25
from storm.store import Store, get_where_for_args, LostObjectError
25
26
from storm.variables import LazyValue
26
27
from storm.expr import (
245
246
                                             self._relation2, local,
246
247
                                             self._order_by)
247
248
 
 
249
    def __set__(self, local, value):
 
250
        raise FeatureError("Assigning to ResultSets not supported")
 
251
 
248
252
    def _build_relations(self):
249
253
        resolver = PropertyResolver(self, self._cls)
250
254