added TODO + formatting

This commit is contained in:
Rudi Grinberg 2012-11-19 20:16:06 -05:00
parent fdf8c9fb4e
commit c1959f936e
1 changed files with 11 additions and 7 deletions

View File

@ -50,15 +50,19 @@ class AirtimeInstance(object):
def mm_config(self): def mm_config(self):
return MMConfig(self.config_paths['media_monitor']) return MMConfig(self.config_paths['media_monitor'])
@LazyProperty # NOTE to future code monkeys:
def owner(self): # I'm well aware that I'm using the shitty service locator pattern
return Owner() # 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 @LazyProperty
def event_registry(self): def owner(self): return Owner()
return EventRegistry()
@LazyProperty @LazyProperty
def file_mediator(self): def event_registry(self): return EventRegistry()
return FileMediator()
@LazyProperty
def file_mediator(self): return FileMediator()