view roundup/support.py @ 3111:e0aab0d08265 maint-0.8

fix roundup-server log and PID file paths to be absolute fix initialisation of roundup-server in daemon mode so initialisation errors are visible
author Richard Jones <richard@users.sourceforge.net>
date Sat, 15 Jan 2005 06:53:00 +0000
parents 887d631ea2ba
children 293a17149765
line wrap: on
line source

"""Implements various support classes and functions used in a number of
places in Roundup code.
"""

__docformat__ = 'restructuredtext'

class TruthDict:
    '''Returns True for valid keys, False for others.
    '''
    def __init__(self, keys):
        if keys:
            self.keys = {}
            for col in keys:
                self.keys[col] = 1
        else:
            self.__getitem__ = lambda name: 1

    def __getitem__(self, name):
        return self.keys.has_key(name)

# vim: set et sts=4 sw=4 :

Roundup Issue Tracker: http://roundup-tracker.org/