From dd37d3dcb76e868f283b913be72a8083c541cf30 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Fri, 7 Mar 2014 16:24:22 -0700 Subject: [PATCH] Various lint fixes --- salt/daemons/flo/minion.py | 9 --------- salt/utils/aggregation.py | 1 + salt/utils/cloud.py | 3 ++- salt/utils/serializers/sls.py | 5 ++--- salt/utils/serializers/yaml.py | 4 ++-- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/salt/daemons/flo/minion.py b/salt/daemons/flo/minion.py index 1138397fbc..ed6d851a74 100644 --- a/salt/daemons/flo/minion.py +++ b/salt/daemons/flo/minion.py @@ -88,15 +88,6 @@ class RouterMinion(ioflo.base.deeding.Deed): # pylint: disable=W0232 self.udp_stack.value.eids[estate]) - -class PillarLoad(ioflo.base.deeding.Deed): # pylint: disable=W0232 - ''' - Load up the pillar in the data store - ''' - Ioinits = {'opts_store': '.salt.opts', - 'grains': '.salt.loader.grains'} - - class ModulesLoad(ioflo.base.deeding.Deed): # pylint: disable=W0232 ''' Reload the minion modules diff --git a/salt/utils/aggregation.py b/salt/utils/aggregation.py index e3f79de987..1a403060d6 100644 --- a/salt/utils/aggregation.py +++ b/salt/utils/aggregation.py @@ -120,6 +120,7 @@ class Aggregate(object): """ pass + class Map(OrderedDict, Aggregate): """ Map aggregation. diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py index 3e066a8c54..13aefe6dbc 100644 --- a/salt/utils/cloud.py +++ b/salt/utils/cloud.py @@ -16,6 +16,7 @@ import multiprocessing import logging import pipes import json +import copy import re # Let's import pwd and catch the ImportError. We'll raise it if this is not @@ -286,7 +287,7 @@ def bootstrap(vm_, opts): log.info('Provisioning existing machine {0}'.format(vm_['name'])) ssh_username = salt.config.get_cloud_config_value('ssh_username', vm_, opts) - deploy_script = script(vm_) + deploy_script = os_script(vm_) deploy_kwargs = { 'host': vm_['ssh_host'], 'username': ssh_username, diff --git a/salt/utils/serializers/sls.py b/salt/utils/serializers/sls.py index b4246172bc..1382aea3b0 100644 --- a/salt/utils/serializers/sls.py +++ b/salt/utils/serializers/sls.py @@ -147,7 +147,6 @@ def deserialize(stream_or_string, **options): except ConstructorError as error: raise DeserializationError(error) except Exception as error: - raise raise DeserializationError(error) @@ -171,7 +170,7 @@ def serialize(obj, **options): raise SerializationError(error) -class Loader(BaseLoader): +class Loader(BaseLoader): # pylint: disable=W0232 ''' Create a custom YAML loader that uses the custom constructor. This allows for the YAML loading defaults to be manipulated based on needs within salt @@ -330,7 +329,7 @@ class SLSMap(OrderedDict): def __str__(self): return serialize(self, default_flow_style=True) - def __repr__(self): + def __repr__(self, _repr_running={}): return serialize(self, default_flow_style=True) diff --git a/salt/utils/serializers/yaml.py b/salt/utils/serializers/yaml.py index efeec01374..aa1e3e1377 100644 --- a/salt/utils/serializers/yaml.py +++ b/salt/utils/serializers/yaml.py @@ -75,7 +75,7 @@ def serialize(obj, **options): raise SerializationError(error) -class Loader(BaseLoader): +class Loader(BaseLoader): # pylint: disable=W0232 """Overwrites Loader as not for polute legacy Loader""" pass @@ -94,7 +94,7 @@ Loader.add_multi_constructor('tag:yaml.org,2002:map', Loader.construct_yaml_map) Loader.add_multi_constructor(None, Loader.construct_undefined) -class Dumper(BaseDumper): +class Dumper(BaseDumper): # pylint: disable=W0232 """Overwrites Dumper as not for polute legacy Dumper""" pass