- added get_owner to actually get the owner of the file for event objects.
- removed possibly annoying logging.
This commit is contained in:
Rudi Grinberg 2012-08-24 18:21:19 -04:00
parent 517fa705bc
commit fec8f06135
1 changed files with 9 additions and 3 deletions

View File

@ -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