summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-01-29 20:13:50 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-01-29 20:13:50 +0000
commit4d1544016635254d1c51ec77e3e26699d64b1d26 (patch)
treec8450876bd18a662af3b0496033d3c2e2ffde349
parent485fbf1a19a8e9663899567922e995f6f94f1f97 (diff)
downloadbcfg2-4d1544016635254d1c51ec77e3e26699d64b1d26.tar.gz
bcfg2-4d1544016635254d1c51ec77e3e26699d64b1d26.tar.bz2
bcfg2-4d1544016635254d1c51ec77e3e26699d64b1d26.zip
Core fixes from pylint
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5048 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Core.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index c9163a29a..120835a65 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -6,7 +6,7 @@ from time import time
from Bcfg2.Server.Plugin import PluginInitError, PluginExecutionError
import Bcfg2.Server.FileMonitor
-import copy, logging, lxml.etree, os
+import copy, logging, lxml.etree
import Bcfg2.Server.Plugins.Metadata
logger = logging.getLogger('Bcfg2.Core')
@@ -56,8 +56,8 @@ class Core(object):
self.metadata = mlist[0]
else:
raise CoreInitError, "No Metadata Plugin"
- self.statistics = [plugin for plugin in self.plugins.values() \
- if isinstance(plugin, Bcfg2.Server.Plugin.Statistics)]
+ self.statistics = [plugin for plugin in self.plugins.values() if \
+ isinstance(plugin, Bcfg2.Server.Plugin.Statistics)]
self.pull_sources = [plugin for plugin in self.statistics if \
isinstance(plugin, Bcfg2.Server.Plugin.PullSource)]
self.generators = [plugin for plugin in self.plugins.values() if \
@@ -161,7 +161,8 @@ class Core(object):
generators = ", ".join([gen.name for gen in glist])
logger.error("%s %s served by multiple generators: %s" % \
(entry.tag, entry.get('name'), generators))
- g2list = [gen for gen in self.generators if gen.HandlesEntry(entry, metadata)]
+ g2list = [gen for gen in self.generators if
+ gen.HandlesEntry(entry, metadata)]
if len(g2list) == 1:
return g2list[0].HandleEntry(entry, metadata)
raise PluginExecutionError, (entry.tag, entry.get('name'))
@@ -169,7 +170,8 @@ class Core(object):
def BuildConfiguration(self, client):
'''Build Configuration for client'''
start = time()
- config = lxml.etree.Element("Configuration", version='2.0', revision=self.revision)
+ config = lxml.etree.Element("Configuration", version='2.0', \
+ revision=self.revision)
try:
meta = self.build_metadata(client)
except Bcfg2.Server.Plugins.Metadata.MetadataConsistencyError:
@@ -215,8 +217,6 @@ class Core(object):
for plugin in self.plugins.values():
if isinstance(plugin, Bcfg2.Server.Plugin.Version):
self.revision = plugin.get_revision()
- else:
- self.revision = '-1'
def GetDecisions(self, metadata, mode):
result = []