##// END OF EJS Templates
Merge pull request #2300 from benjiec/master...
Thomas Kluyver -
r8237:3c8d448a merge
parent child Browse files
Show More
@@ -106,7 +106,10 b' class HistoryAccessor(Configurable):'
106 106 db = Any()
107 107 def _db_changed(self, name, old, new):
108 108 """validate the db, since it can be an Instance of two different types"""
109 if not isinstance(new, (sqlite3.Connection, DummyDB)):
109 connection_types = (DummyDB,)
110 if sqlite3 is not None:
111 connection_types = (DummyDB, sqlite3.Connection)
112 if not isinstance(new, connection_types):
110 113 msg = "%s.db must be sqlite3 Connection or DummyDB, not %r" % \
111 114 (self.__class__.__name__, new)
112 115 raise TraitError(msg)
General Comments 0
You need to be logged in to leave comments. Login now