3rd iteration of logging cleanup.

This commit is contained in:
Darko Poljak 2017-06-29 09:22:59 +02:00 • committed by Steven Armstrong
commit a722f3c634
9 changed files with 15 additions and 14 deletions

View file

@ -22,7 +22,6 @@
#
import fnmatch
import logging
import os
import collections
@ -30,8 +29,6 @@ import cdist
import cdist.core
from cdist.util import fsproperty
log = logging.getLogger(__name__)
class IllegalObjectIdError(cdist.Error):
def __init__(self, object_id, message=None):

View file

@ -21,7 +21,6 @@
#
import os
import cdist

View file

@ -21,13 +21,10 @@
#
#
import logging
import os
import cdist
log = logging.getLogger(__name__)
'''
common:

View file

@ -168,6 +168,8 @@ class Explorer(object):
in the object.
"""
self.log.info("Running type explorers for {}".format(
cdist_object.cdist_type))
self.log.trace("Transfering type explorers for type: %s",
cdist_object.cdist_type)
self.transfer_type_explorers(cdist_object.cdist_type)

View file

@ -145,12 +145,11 @@ class Manifest(object):
else:
user_supplied = True
self.log.info("Running initial manifest " + initial_manifest)
if not os.path.isfile(initial_manifest):
raise NoInitialManifestError(initial_manifest, user_supplied)
message_prefix = "initialmanifest"
self.log.info("Running initial manifest " + initial_manifest)
self.local.run_script(initial_manifest,
env=self.env_initial_manifest(initial_manifest),
message_prefix=message_prefix,
@ -177,6 +176,7 @@ class Manifest(object):
cdist_object.cdist_type.manifest_path)
message_prefix = cdist_object.name
if os.path.isfile(type_manifest):
self.log.info("Running type manifest " + type_manifest)
self.local.run_script(type_manifest,
env=self.env_type_manifest(cdist_object),
message_prefix=message_prefix,