From 760749e0f568a93656be50f8c65a48f32e6a35b4 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 31 Aug 2004 14:41:40 +0000 Subject: remove code duplication (Logical change 1.45) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@274 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Core.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py index 09dd1d086..4d2a02fa6 100644 --- a/src/lib/Server/Core.py +++ b/src/lib/Server/Core.py @@ -16,7 +16,7 @@ class PublishError(Exception): pass class fam(object): - '''The fam object contains alteration monitors''' + '''The fam object is a set of callbacks for file alteration events''' def __init__(self): self.fm = _fam.open() @@ -30,10 +30,9 @@ class fam(object): m = stat(path)[ST_MODE] if S_ISDIR(m): h = self.fm.monitorDirectory(path, None) - self.handles[h.requestID()] = h else: h = self.fm.monitorFile(path, None) - self.handles[h.requestID()] = h + self.handles[h.requestID()] = h if obj != None: self.users[h.requestID()] = obj return h.requestID() -- cgit v1.2.3-1-g7c22