From: Mark Hymers Date: Tue, 29 Mar 2011 20:07:56 +0000 (+0100) Subject: Add backwards compatibility code X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebed01190083b1dee29ea9be0e9e9f7ccd2e3757;p=dak Add backwards compatibility code Signed-off-by: Mark Hymers --- diff --git a/daklib/daklog.py b/daklib/daklog.py index a3b9b02b..d4c7867d 100644 --- a/daklib/daklog.py +++ b/daklib/daklog.py @@ -40,7 +40,14 @@ class Logger(object): self.__dict__ = self.__shared_state if not getattr(self, 'initialised', False): + from daklib.config import Config self.initialised = True + + # To be backwards compatibile, dump the first argument if it's a + # Config object. TODO: Fix up all callers and remove this + if len(args) > 0 and isinstance(args[0], Config): + args.pop(0) + self.__setup(*args, **kwargs)