Please sign in to comment.
Tweak dbutils.User class a little
Move static makeAnonymous() function down to the other static functions. Don't load all preferences when setting one, and update the cached or loaded preference value when setting the preference. Raise base.ImplementationError exception instead of Exception when attempting to read a preference that doesn't exist in the database. Assert against using str() or int() on anonymous user. They normally return the user name or id, and anonymous users have neither. (And Python doesn't allow returning None from __str__() or __int__().) Use isinstance(X, basestring) instead of isinstance(X, str).
- Loading branch information...