diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-05-24 23:55:57 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-05-24 23:55:57 +0000 |
commit | ce2c306c68a01349a28d8a3356ceff3efc153e28 (patch) | |
tree | 3cc69da6fdbeb56b6664271b670bef24a3122cc7 /src/lib | |
parent | 9e0626c7d04539c5aa1104b398f6f146ad8380a5 (diff) | |
download | bcfg2-ce2c306c68a01349a28d8a3356ceff3efc153e28.tar.gz bcfg2-ce2c306c68a01349a28d8a3356ceff3efc153e28.tar.bz2 bcfg2-ce2c306c68a01349a28d8a3356ceff3efc153e28.zip |
Make pseudofam work on systems without Gamin
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5256 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/FileMonitor.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/lib/Server/FileMonitor.py b/src/lib/Server/FileMonitor.py index 566e99477..4b980a098 100644 --- a/src/lib/Server/FileMonitor.py +++ b/src/lib/Server/FileMonitor.py @@ -34,14 +34,9 @@ class GaminEvent(Event): ''' def __init__(self, request_id, filename, code): Event.__init__(self, request_id, filename, code) - action_map = {} - if 'fam' not in available and 'gamin' not in available: - pass - else: - # Only works if Gamin or Fam is present - action_map = {GAMCreated: 'created', GAMExists: 'exists', - GAMChanged: 'changed', GAMDeleted: 'deleted', - GAMEndExist: 'endExist', GAMMoved: 'moved'} + action_map = {GAMCreated: 'created', GAMExists: 'exists', + GAMChanged: 'changed', GAMDeleted: 'deleted', + GAMEndExist: 'endExist', GAMMoved: 'moved'} if code in action_map: self.action = action_map[code] @@ -191,10 +186,10 @@ class Pseudo(FileMonitor): dirList = os.listdir(path) self.pending_events.append(handle) for includedFile in dirList: - self.pending_events.append(GaminEvent(handleID, includedFile, 'exists')) - self.pending_events.append(GaminEvent(handleID, path, 'endExist')) + self.pending_events.append(Event(handleID, includedFile, 'exists')) + self.pending_events.append(Event(handleID, path, 'endExist')) else: - self.pending_events.append(GaminEvent(handleID, path, 'exists')) + self.pending_events.append(Event(handleID, path, 'exists')) if obj != None: self.handles[handleID] = obj return handleID |