cc-3936:
- added get_owner to actually get the owner of the file for event objects. - removed possibly annoying logging.
This commit is contained in:
parent
517fa705bc
commit
fec8f06135
python_apps/media-monitor2/media/monitor
|
@ -11,6 +11,14 @@ def reset_owners():
|
|||
global owners
|
||||
owners = {}
|
||||
|
||||
|
||||
def get_owner(f):
|
||||
"""
|
||||
Get the owner id of the file 'f'
|
||||
"""
|
||||
return owners[f] if f in owners else -1
|
||||
|
||||
|
||||
def add_file_owner(f,owner):
|
||||
"""
|
||||
Associate file f with owner. If owner is -1 then do we will not record it
|
||||
|
@ -40,7 +48,5 @@ def remove_file_owner(f):
|
|||
if f in owners:
|
||||
del owners[f]
|
||||
return True
|
||||
else:
|
||||
log.warn("Trying to delete file that does not exist: '%s'" % f)
|
||||
return False
|
||||
else: return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue