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
|
@ -11,6 +11,14 @@ def reset_owners():
|
||||||
global owners
|
global owners
|
||||||
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):
|
def add_file_owner(f,owner):
|
||||||
"""
|
"""
|
||||||
Associate file f with owner. If owner is -1 then do we will not record it
|
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:
|
if f in owners:
|
||||||
del owners[f]
|
del owners[f]
|
||||||
return True
|
return True
|
||||||
else:
|
else: return False
|
||||||
log.warn("Trying to delete file that does not exist: '%s'" % f)
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue