view Preference.py @ 101:b2a51c24f209

Provide a better error message if updating a feed fails.
author Dirk Olmes <dirk@xanthippe.ping.de>
date Tue, 15 Feb 2011 03:40:26 +0100
parents be990ac6e478
children
line wrap: on
line source


class Preference(object):
    @staticmethod
    def forKey(key, session):
        return session.query(Preference).filter(Preference.key == key).first()
    
    def __init__(self, key, value):
        self.key = key
        self.value = value
    
    def __repr__(self):
        return "<Preference %s = %s>" % (self.key, self.value)