From c1959f936ea8166858d3172f5193fc4ce092747c Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 19 Nov 2012 20:16:06 -0500 Subject: [PATCH] added TODO + formatting --- .../media/saas/airtimeinstance.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/python_apps/media-monitor2/media/saas/airtimeinstance.py b/python_apps/media-monitor2/media/saas/airtimeinstance.py index 67e7f8beb..5d02cd8e4 100644 --- a/python_apps/media-monitor2/media/saas/airtimeinstance.py +++ b/python_apps/media-monitor2/media/saas/airtimeinstance.py @@ -50,15 +50,19 @@ class AirtimeInstance(object): def mm_config(self): return MMConfig(self.config_paths['media_monitor']) - @LazyProperty - def owner(self): - return Owner() + # NOTE to future code monkeys: + # I'm well aware that I'm using the shitty service locator pattern + # instead of normal constructor injection as I should be. The reason + # for this is that I found these issues a little too close to the + # end of my tenure. It's highly recommended to rewrite this crap + # using proper constructor injection if you ever have the time @LazyProperty - def event_registry(self): - return EventRegistry() + def owner(self): return Owner() @LazyProperty - def file_mediator(self): - return FileMediator() + def event_registry(self): return EventRegistry() + + @LazyProperty + def file_mediator(self): return FileMediator()