From 80ca0e1707ca64477efef7e576c6491da6efef73 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowak Date: Fri, 26 Feb 2016 20:34:11 +0100 Subject: [PATCH] Replace Bunch with Munch package Munch is fork of Bunch. Munch is still maintained and already packaged on Centos. Change-Id: I4044acd4467b364bb8e68c2e02db59f60a5c8ed1 --- requirements.txt | 2 +- solar/config.py | 6 +++--- solar/utils.py | 4 ++-- specs/solar.spec | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index 9be6128f..c2f683c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,7 +34,7 @@ zerorpc>=0.5.2 # Packages beyond this comment are not in OS Global Requirements -bunch>=1.0.1 +munch>=1.0.1 click>=6.2 dictdiffer>=0.4.0 Fabric>=1.10.2 diff --git a/solar/config.py b/solar/config.py index 20c991ae..292d2a77 100644 --- a/solar/config.py +++ b/solar/config.py @@ -16,14 +16,14 @@ import os -from bunch import Bunch +from munch import Munch import yaml CWD = os.getcwd() -C = Bunch(solar_db="") +C = Munch(solar_db="") C.riak_ensemble = False C.lock_bucket_type = None C.counter_bucket_type = None @@ -45,7 +45,7 @@ def _lookup_vals(setter, config, prefix=None): sub = [key] else: sub = prefix + [key] - if isinstance(val, Bunch): + if isinstance(val, Munch): _lookup_vals(setter, val, sub) else: setter(config, sub) diff --git a/solar/utils.py b/solar/utils.py index fa7708a0..64b68979 100644 --- a/solar/utils.py +++ b/solar/utils.py @@ -23,8 +23,8 @@ import threading import urlparse import uuid -from bunch import Bunch from jinja2 import Environment +from munch import Munch import yaml @@ -168,7 +168,7 @@ def parse_database_conn(name): if m is not None: groups = m.groupdict() groups['type'] = 'riak' if groups['mode'] == 'riak' else 'sql' - return Bunch(groups), Bunch(opts) + return Munch(groups), Munch(opts) else: raise Exception("Invalid database connection string: %r " "It should be in RFC 1738 format. " % name) diff --git a/specs/solar.spec b/specs/solar.spec index 4797d53e..e63877d6 100644 --- a/specs/solar.spec +++ b/specs/solar.spec @@ -20,7 +20,7 @@ BuildArch: noarch Requires: ansible >= 2.0 Requires: python Requires: python-fabric >= 1.10.2 -Requires: python-bunch +Requires: python-munch Requires: python-click >= 6 Requires: python-dictdiffer >= 0.4.0 Requires: python-enum34 >= 1.0.4