diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1c4139942f..dac5e9285c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,15 @@ Changelog .. Release notes for existing releases are MUTABLE! If there is something that was missed or can be improved, feel free to change it! +[unreleased] +------------ + +Fixed +~~~~~ + +* Python 3 issue of Verification component +* Docker README file + [1.4.0] - 2019-02-04 -------------------- diff --git a/rally/verification/manager.py b/rally/verification/manager.py index de771da6ce..881448d103 100644 --- a/rally/verification/manager.py +++ b/rally/verification/manager.py @@ -191,7 +191,8 @@ class VerifierManager(plugin.Plugin): def _clone(self): """Clone a repo and switch to a certain version.""" source = self.verifier.source or self._meta_get("default_repo") - if not URL_RE.match(source) and not os.path.exists(source): + if not source or ( + not URL_RE.match(source) and not os.path.exists(source)): raise exceptions.RallyException("Source path '%s' is not valid." % source) diff --git a/rally/verification/utils.py b/rally/verification/utils.py index cdf823afdb..7a0639f21f 100644 --- a/rally/verification/utils.py +++ b/rally/verification/utils.py @@ -58,8 +58,9 @@ def check_output(*args, **kwargs): LOG.error("Error output: '%s'" % encodeutils.safe_decode(exc.output)) raise + output = encodeutils.safe_decode(output) if output and debug_output: - LOG.debug("Subprocess output: '%s'" % encodeutils.safe_decode(output)) + LOG.debug("Subprocess output: '%s'" % output) return output diff --git a/tests/unit/verification/test_utils.py b/tests/unit/verification/test_utils.py index e113120306..ae388b1531 100644 --- a/tests/unit/verification/test_utils.py +++ b/tests/unit/verification/test_utils.py @@ -40,9 +40,11 @@ class UtilsTestCase(test.TestCase): def test_check_output(self, mock_check_output, mock_log, mock_encodeutils): - self.assertEqual(mock_check_output.return_value, + self.assertEqual(mock_encodeutils.safe_decode.return_value, utils.check_output()) self.assertFalse(mock_log.error.called) + mock_encodeutils.safe_decode.assert_called_once_with( + mock_check_output.return_value) mock_check_output.side_effect = subprocess.CalledProcessError(1, None) self.assertRaises(subprocess.CalledProcessError, utils.check_output)