diff --git a/salt/utils/__init__.py b/salt/utils/__init__.py index 608c9cf1b7..170f553299 100644 --- a/salt/utils/__init__.py +++ b/salt/utils/__init__.py @@ -105,8 +105,6 @@ from salt.exceptions import ( SaltInvocationError ) -# Import third party libs -import yaml log = logging.getLogger(__name__) _empty = object() @@ -137,6 +135,8 @@ def get_color_theme(theme): ''' Return the color theme to use ''' + # Keep the heavy lifting out of the module space + import yaml if not os.path.isfile(theme): log.warning('The named theme {0} if not available'.format(theme)) try: diff --git a/salt/utils/event.py b/salt/utils/event.py index fa81adc54d..7fc2cc255e 100644 --- a/salt/utils/event.py +++ b/salt/utils/event.py @@ -175,10 +175,6 @@ class SaltEvent(object): self.pending_events = [] self.__load_cache_regex() - # since ZMQ connect() has no guarantees about the socket actually being - # connected this is a hack to attempt to do so. - self.get_event(wait=1) - @classmethod def __load_cache_regex(cls): '''