summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/FileMonitor
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-04-24 13:47:31 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-04-24 13:47:31 -0400
commit0ff6b2788de683dd89203c7ae1393ea922a62c32 (patch)
tree54ce843377ab26c6336de7f1abf3ec906d49aa69 /src/lib/Bcfg2/Server/FileMonitor
parent46a47b4120b3d892b8149a5e181e4d976ad87f99 (diff)
parent29399cbc599919fd9c88448bde692132c803e69b (diff)
downloadbcfg2-0ff6b2788de683dd89203c7ae1393ea922a62c32.tar.gz
bcfg2-0ff6b2788de683dd89203c7ae1393ea922a62c32.tar.bz2
bcfg2-0ff6b2788de683dd89203c7ae1393ea922a62c32.zip
Merge branch 'maint'
Conflicts: src/lib/Bcfg2/Client/Client.py src/lib/Bcfg2/Client/Frame.py src/lib/Bcfg2/Client/Tools/YUM.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Perf.py src/lib/Bcfg2/Server/Admin/Xcmd.py src/lib/Bcfg2/Server/Admin/__init__.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/FileMonitor/Fam.py src/lib/Bcfg2/Server/Lint/RequiredAttrs.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Base.py src/lib/Bcfg2/Server/Plugins/Bundler.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py src/lib/Bcfg2/Server/Plugins/Cvs.py src/lib/Bcfg2/Server/Plugins/Darcs.py src/lib/Bcfg2/Server/Plugins/Decisions.py src/lib/Bcfg2/Server/Plugins/FileProbes.py src/lib/Bcfg2/Server/Plugins/Fossil.py src/lib/Bcfg2/Server/Plugins/Git.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/Plugins/NagiosGen.py src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py src/lib/Bcfg2/Server/Plugins/Packages/Source.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Properties.py src/lib/Bcfg2/Server/Plugins/__init__.py src/lib/Bcfg2/Server/__init__.py src/sbin/bcfg2-build-reports src/sbin/bcfg2-crypt testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestMetadata.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProperties.py
Diffstat (limited to 'src/lib/Bcfg2/Server/FileMonitor')
-rw-r--r--src/lib/Bcfg2/Server/FileMonitor/Inotify.py8
-rw-r--r--src/lib/Bcfg2/Server/FileMonitor/Pseudo.py2
2 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py
index cdd52dbb9..2cdf27ed8 100644
--- a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py
+++ b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py
@@ -3,14 +3,11 @@ support. """
import os
import errno
-import logging
import pyinotify
from Bcfg2.Compat import reduce # pylint: disable=W0622
from Bcfg2.Server.FileMonitor import Event
from Bcfg2.Server.FileMonitor.Pseudo import Pseudo
-LOGGER = logging.getLogger(__name__)
-
class Inotify(Pseudo, pyinotify.ProcessEvent):
""" File monitor backend with `inotify
@@ -123,8 +120,9 @@ class Inotify(Pseudo, pyinotify.ProcessEvent):
try:
watch = self.watchmgr.watches[ievent.wd]
except KeyError:
- LOGGER.error("Error handling event %s for %s: Watch %s not found" %
- (action, ievent.pathname, ievent.wd))
+ self.logger.error("Error handling event %s for %s: "
+ "Watch %s not found" %
+ (action, ievent.pathname, ievent.wd))
return
# FAM-style file monitors return the full path to the parent
# directory that is being watched, relative paths to anything
diff --git a/src/lib/Bcfg2/Server/FileMonitor/Pseudo.py b/src/lib/Bcfg2/Server/FileMonitor/Pseudo.py
index 24cd099d0..b1e1adab7 100644
--- a/src/lib/Bcfg2/Server/FileMonitor/Pseudo.py
+++ b/src/lib/Bcfg2/Server/FileMonitor/Pseudo.py
@@ -24,6 +24,6 @@ class Pseudo(FileMonitor):
self.events.append(Event(handleID, fname, 'exists'))
self.events.append(Event(handleID, path, 'endExist'))
- if obj != None:
+ if obj is not None:
self.handles[handleID] = obj
return handleID