]> git.decadent.org.uk Git - dak.git/commitdiff
Add backwards compatibility code
authorMark Hymers <mhy@debian.org>
Tue, 29 Mar 2011 20:07:56 +0000 (21:07 +0100)
committerMark Hymers <mhy@debian.org>
Tue, 29 Mar 2011 20:07:56 +0000 (21:07 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
daklib/daklog.py

index a3b9b02bcfd82acc671b30c63a2b6d7d5c26e4aa..d4c7867d7179c45e5447af5bb2cf5a9d9df7a020 100644 (file)
@@ -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)