diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2009-05-11 17:13:12 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2009-05-11 17:13:12 +0000 |
commit | d0d32c1cb5c5c35f897431cffa3b7ca9286d6c0d (patch) | |
tree | 43d3e21a85352aae8f7eb55b10dd6e081536f11b /src/lib/Server/Admin | |
parent | ef5bd55c3095b59d52d5a5ad5cda032892284543 (diff) | |
download | bcfg2-d0d32c1cb5c5c35f897431cffa3b7ca9286d6c0d.tar.gz bcfg2-d0d32c1cb5c5c35f897431cffa3b7ca9286d6c0d.tar.bz2 bcfg2-d0d32c1cb5c5c35f897431cffa3b7ca9286d6c0d.zip |
Update admin modes for new FileMonitor interface
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5216 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Admin')
-rw-r--r-- | src/lib/Server/Admin/Query.py | 8 | ||||
-rw-r--r-- | src/lib/Server/Admin/__init__.py | 10 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/Server/Admin/Query.py b/src/lib/Server/Admin/Query.py index 24847d74e..4d77b1563 100644 --- a/src/lib/Server/Admin/Query.py +++ b/src/lib/Server/Admin/Query.py @@ -1,4 +1,6 @@ -import Bcfg2.Server.Admin, Bcfg2.Logger, logging +import logging +import Bcfg2.Logger +import Bcfg2.Server.Admin class Query(Bcfg2.Server.Admin.Mode): __shorthelp__ = "Query clients" @@ -25,10 +27,8 @@ class Query(Bcfg2.Server.Admin.Mode): 'foo', False, 'UTF-8') except Bcfg2.Server.Core.CoreInitError, msg: self.errExit("Core load failed because %s" % msg) - [self.bcore.fam.Service() for _ in range(1)] + self.bcore.fam.handle_events_in_interval(1) self.meta = self.bcore.metadata - while self.bcore.fam.Service(): - pass def __call__(self, args): Bcfg2.Server.Admin.Mode.__call__(self, args) diff --git a/src/lib/Server/Admin/__init__.py b/src/lib/Server/Admin/__init__.py index e92020e5d..28db72aac 100644 --- a/src/lib/Server/Admin/__init__.py +++ b/src/lib/Server/Admin/__init__.py @@ -3,7 +3,11 @@ __revision__ = '$Revision$' __all__ = ['Mode', 'Client', 'Compare', 'Fingerprint', 'Init', 'Minestruct', 'Pull', 'Query', 'Snapshots', 'Tidy', 'Viz'] -import ConfigParser, lxml.etree, logging, sys +import ConfigParser +import logging +import lxml.etree +import sys + import Bcfg2.Server.Core import Bcfg2.Options @@ -63,9 +67,7 @@ class MetadataCore(Mode): 'foo', 'UTF-8') except Bcfg2.Server.Core.CoreInitError, msg: self.errExit("Core load failed because %s" % msg) - [self.bcore.fam.Service() for _ in range(5)] - while self.bcore.fam.Service(): - pass + self.bcore.fam.handle_events_in_interval(5) self.metadata = self.bcore.metadata class StructureMode(MetadataCore): |