summaryrefslogtreecommitdiff
path: root/portato/db
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-03-05 03:07:10 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-03-05 03:07:10 +0100
commita7af114590bfb4a6d2f125610c2c755339f993a2 (patch)
tree406095d420613504f2175df6f3ee688ab22abd5f /portato/db
parent22bf1fe929e9997f13d0110cba1347d00fdd21cf (diff)
downloadportato-a7af114590bfb4a6d2f125610c2c755339f993a2.tar.gz
portato-a7af114590bfb4a6d2f125610c2c755339f993a2.tar.bz2
portato-a7af114590bfb4a6d2f125610c2c755339f993a2.zip
Save current search type in session
Diffstat (limited to 'portato/db')
-rw-r--r--portato/db/database.py5
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