cc-4672: added dirty workaround to fix this issue

This commit is contained in:
Rudi Grinberg 2012-11-06 16:16:37 -05:00
parent 1762e418c0
commit b3c9472bcb
1 changed files with 7 additions and 0 deletions
python_apps/media-monitor2/media/monitor

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import os
import abc
import re
import media.monitor.pure as mmp
import media.monitor.owners as owners
from media.monitor.pure import LazyProperty
@ -101,6 +102,12 @@ class BaseEvent(Loggable):
self.path = os.path.normpath(raw_event.pathname)
else: self.path = raw_event
self.owner = owners.get_owner(self.path)
owner_re = re.search('stor/imported/(?P<owner>\d+)/', self.path)
if owner_re:
self.logger.info("matched path: %s" % self.path)
self.owner = owner_re.group('owner')
else:
self.logger.info("did not match path: %s" % self.path)
self._pack_hook = lambda: None # no op
# into another event