vregistry.py
branchstable
changeset 5103 2b242604fc42
parent 5096 e25979a6d795
child 5143 43afbdd5c8b4
--- 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)