From 606b76449a26ef6a8027766b2a12f88f39668029 Mon Sep 17 00:00:00 2001 From: Isaac Shabtay Date: Thu, 16 Nov 2017 04:20:05 -0800 Subject: [PATCH] Changed version and fixed flake issues --- agent_packager/dictconfig.py | 4 ++-- agent_packager/tests/test_agent_packager.py | 14 +++++++------- setup.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/agent_packager/dictconfig.py b/agent_packager/dictconfig.py index 295edbe..8673069 100644 --- a/agent_packager/dictconfig.py +++ b/agent_packager/dictconfig.py @@ -14,9 +14,8 @@ def valid_ident(s): raise ValueError('Not a valid Python identifier: %r' % s) return True -# + # This function is defined in logging only in recent versions of Python -# try: from logging import _checkLevel except ImportError: @@ -538,6 +537,7 @@ def configure_root(self, config, incremental=False): root = logging.getLogger() self.common_logger_config(root, config, incremental) + dictConfigClass = DictConfigurator diff --git a/agent_packager/tests/test_agent_packager.py b/agent_packager/tests/test_agent_packager.py index aed9724..bf19755 100644 --- a/agent_packager/tests/test_agent_packager.py +++ b/agent_packager/tests/test_agent_packager.py @@ -47,7 +47,7 @@ def venv(func): def execution_handler(*args, **kwargs): try: shutil.rmtree(TEST_VENV) - except: + except Exception: pass utils.make_virtualenv(TEST_VENV) func(*args, **kwargs) @@ -60,16 +60,16 @@ class TestUtils(testtools.TestCase): def test_set_global_verbosity_level(self): lgr = init(base_level=logging.INFO) - with LogCapture() as l: + with LogCapture() as log_cap: ap.set_global_verbosity_level(is_verbose_output=False) lgr.debug('TEST_LOGGER_OUTPUT') - l.check() + log_cap.check() lgr.info('TEST_LOGGER_OUTPUT') - l.check(('user', 'INFO', 'TEST_LOGGER_OUTPUT')) + log_cap.check(('user', 'INFO', 'TEST_LOGGER_OUTPUT')) ap.set_global_verbosity_level(is_verbose_output=True) lgr.debug('TEST_LOGGER_OUTPUT') - l.check( + log_cap.check( ('user', 'INFO', 'TEST_LOGGER_OUTPUT'), ('user', 'DEBUG', 'TEST_LOGGER_OUTPUT')) @@ -263,9 +263,9 @@ def test_dryrun(self): '--no-validation': False, '--verbose': True } - with LogCapture(level=logging.INFO) as l: + with LogCapture(level=logging.INFO) as log_cap: e = self.assertRaises(SystemExit, cli._run, cli_options) - l.check(('user', 'INFO', 'Dryrun complete')) + log_cap.check(('user', 'INFO', 'Dryrun complete')) self.assertEqual(codes.notifications['dryrun_complete'], e.message) @venv diff --git a/setup.py b/setup.py index f872b0b..0d0ab26 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ def read(*parts): setup( name='cloudify-agent-packager', - version='4.0.0', + version='4.3', url='https://github.com/cloudify-cosmo/cloudify-agent-packager', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com',