diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2010-03-05 03:07:10 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2010-03-05 03:07:10 +0100 |
commit | a7af114590bfb4a6d2f125610c2c755339f993a2 (patch) | |
tree | 406095d420613504f2175df6f3ee688ab22abd5f /portato/db/database.py | |
parent | 22bf1fe929e9997f13d0110cba1347d00fdd21cf (diff) | |
download | portato-a7af114590bfb4a6d2f125610c2c755339f993a2.tar.gz portato-a7af114590bfb4a6d2f125610c2c755339f993a2.tar.bz2 portato-a7af114590bfb4a6d2f125610c2c755339f993a2.zip |
Save current search type in session
Diffstat (limited to '')
-rw-r--r-- | portato/db/database.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/portato/db/database.py b/portato/db/database.py index 8e10a40..c4ab680 100644 --- a/portato/db/database.py +++ b/portato/db/database.py @@ -14,7 +14,7 @@ from __future__ import absolute_import, with_statement from threading import RLock from functools import wraps -from ..helper import error +from ..helper import warning class UnsupportedSearchTypeError(Exception): pass @@ -74,8 +74,7 @@ class Database (object): raise NotImplentedError def set_type (self, type): - if type & self.search_types() == 0: - error("Search type %s not supported by database '%s'.", type, self.__class__.__name__) + if type & self.search_types() != type: raise UnsupportedSearchTypeError, type self._type = type |