dabo Commit
Revision 2206
Date: 2006-06-06 14:31:59 -0700 (Tue, 06 Jun 2006)
Author: paul

Changed:
U   trunk/dabo/dPref.py

Log:
Changed an errorLog.write() call to a warnings.warn() call instead, as this
error will occur before the logObject is instantiated yet. Also, I made the
message more explicitly describe what it is the user will need to install.



Diff:
Modified: trunk/dabo/dPref.py
===================================================================
--- trunk/dabo/dPref.py 2006-06-06 20:44:18 UTC (rev 2205)
+++ trunk/dabo/dPref.py 2006-06-06 21:31:59 UTC (rev 2206)
@@ -1,12 +1,17 @@
 import os
+import warnings
 import datetime
 import dabo
 from dabo.dLocalize import _
 import dabo.lib.utils as utils
+
 try:
        from pysqlite2 import dbapi2 as sqlite
 except ImportError:
-       dabo.errorLog.write("This class requires SQLite")
+       # pkm: We can't use the errorLog to warn of this problem, because 
errorLog
+       #      descends from dObject, which needs to load dPref.py first.
+       warnings.warn("Class dPref requires package 'pysqlite2'.")
+       #dabo.errorLog.write("This class requires SQLite")
 
 # We don't want to deal with these as preferences.
 regularAtts = ("_cache", "_parent", "_key", "_cursor", "_cxn", "_typeDict", 
"AutoPersist",




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to