# HG changeset patch # User Sylvain Thénault # Date 1270030940 -7200 # Node ID 2b242604fc42464e632e463d2a4580b23248f1e4 # Parent 04c84959cd854c307628311ddb8a9fb3dc10df09 [vreg] we do want the opposite... diff -r 04c84959cd85 -r 2b242604fc42 server/test/unittest_repository.py --- a/server/test/unittest_repository.py Wed Mar 31 12:26:07 2010 +0200 +++ b/server/test/unittest_repository.py Wed Mar 31 12:22:20 2010 +0200 @@ -484,7 +484,6 @@ """ def setUp(self): CubicWebTC.setUp(self) - self.hm = self.repo.hm CALLED[:] = () def _after_relation_hook(self, pool, fromeid, rtype, toeid): @@ -500,7 +499,7 @@ def __call__(self): CALLED.append((self.event, self.eidfrom, self.rtype, self.eidto)) - self.hm.register(EcritParHook) + self.vreg.register(EcritParHook) eidp = self.execute('INSERT Personne X: X nom "toto"')[0][0] eidn = self.execute('INSERT Note X: X type "T"')[0][0] self.execute('SET N ecrit_par Y WHERE N type "T", Y nom "toto"') diff -r 04c84959cd85 -r 2b242604fc42 vregistry.py --- a/vregistry.py Wed Mar 31 12:26:07 2010 +0200 +++ b/vregistry.py Wed Mar 31 12:22:20 2010 +0200 @@ -222,15 +222,13 @@ % (args, kwargs.keys(), [repr(v) for v in appobjects])) if len(winners) > 1: - # don't we want the opposite: log in production environement, error - # while debugging? + # log in production environement, error while debugging if self.config.debugmode: - self.error('select ambiguity, args: %s\nkwargs: %s %s', - args, kwargs.keys(), [repr(v) for v in winners]) - else: raise Exception('select ambiguity, args: %s\nkwargs: %s %s' % (args, kwargs.keys(), [repr(v) for v in winners])) + self.error('select ambiguity, args: %s\nkwargs: %s %s', + args, kwargs.keys(), [repr(v) for v in winners]) # return the result of calling the appobject return winners[0](*args, **kwargs)