From ebed01190083b1dee29ea9be0e9e9f7ccd2e3757 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Tue, 29 Mar 2011 21:07:56 +0100 Subject: [PATCH] Add backwards compatibility code Signed-off-by: Mark Hymers --- daklib/daklog.py | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.39.5