On 17-Sep-08, at 11:37 AM, Mark J. Nelson wrote: > > - I'm not thrilled with the explicit fallback from Monaco and/or > BOO to DOO, especially not in the BugDB lookup method. I think the > caller should be able to specify where to look for bugs, and how to > prioritize those sources of info. See below. > > So the way I had envisioned something like this working would be to > have two classes, something like "BugInfoServer" and "BugDB." > > The BugDB initializer would take a list of BugInfoServer objects, in > priority order. For each lookup, test for validity of the bugid > against each BugInfoServer (presumably via a class method) in turn, > until you have exhausted the search space. Not sure whether a valid > return should mean "stop searching," that probably depends on > whether a bugid may be valid in multiple info servers. > > The BugInfoServer class would have (at least) two subclasses: > Bugster (which would encompass both Monaco and BOO, depending on > SWAN access) and Bugzilla (which would take a server argument, > probably defaulting to DOO). > > Am I making this too complex and general?
Well, you're right of course, What I wonder is if it makes sense to meet halfway on that and keep what's there, as well as adding a list of priorities to BugDB.__init__ ( something as simple as literally a list might work ) __init__(self, forceBoo = false, priorities = [ "monaco", "boo", "doo" ] ) ... for example ? thoughts? Thanks -JohnS