cc-4672: added dirty workaround to fix this issue
This commit is contained in:
parent
1762e418c0
commit
b3c9472bcb
1 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
import abc
|
import abc
|
||||||
|
import re
|
||||||
import media.monitor.pure as mmp
|
import media.monitor.pure as mmp
|
||||||
import media.monitor.owners as owners
|
import media.monitor.owners as owners
|
||||||
from media.monitor.pure import LazyProperty
|
from media.monitor.pure import LazyProperty
|
||||||
|
@ -101,6 +102,12 @@ class BaseEvent(Loggable):
|
||||||
self.path = os.path.normpath(raw_event.pathname)
|
self.path = os.path.normpath(raw_event.pathname)
|
||||||
else: self.path = raw_event
|
else: self.path = raw_event
|
||||||
self.owner = owners.get_owner(self.path)
|
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
|
self._pack_hook = lambda: None # no op
|
||||||
# into another event
|
# into another event
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue