From: Oleh Prypin Date: Tue, 14 Jun 2016 21:50:20 +0000 (+0300) Subject: Fix tabs->whitespace in ceph_argparse X-Git-Tag: v10.2.3~60^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b01af21ceeb83e3b2fb7cee608f2a9229e6eed7e;p=ceph.git Fix tabs->whitespace in ceph_argparse Signed-off-by: Oleh Prypin (cherry picked from commit bef2c83c1da7dcc32fc2ff98cf214fc93bef75b8) --- diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index 0df7e39423120..18a87183c2a93 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -1125,14 +1125,14 @@ class RadosThread(threading.Thread): self.args = args self.kwargs = kwargs self.target = target - self.exception = None + self.exception = None threading.Thread.__init__(self) def run(self): try: - self.retval = self.target(*self.args, **self.kwargs) - except Exception as e: - self.exception = e + self.retval = self.target(*self.args, **self.kwargs) + except Exception as e: + self.exception = e # time in seconds between each call to t.join() for child thread diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py index 4c325f278e524..17cbddd2be742 100755 --- a/src/test/pybind/test_ceph_argparse.py +++ b/src/test/pybind/test_ceph_argparse.py @@ -89,11 +89,11 @@ class TestArgparse: class TestBasic: - def test_non_ascii_in_non_options(self): - # unicode() is not able to convert this str parameter into unicode - # using the default encoding 'ascii'. and validate_command() should - # not choke on it. - assert_is_none(validate_command(sigdict, ['章鱼和鱿鱼'])) + def test_non_ascii_in_non_options(self): + # unicode() is not able to convert this str parameter into unicode + # using the default encoding 'ascii'. and validate_command() should + # not choke on it. + assert_is_none(validate_command(sigdict, ['章鱼和鱿鱼'])) class TestPG(TestArgparse): @@ -638,7 +638,7 @@ class TestOSD(TestArgparse): 'rename-bucket'])) assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rename-bucket', - 'srcname'])) + 'srcname'])) assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rename-bucket', 'srcname', 'dstname', @@ -744,7 +744,7 @@ class TestOSD(TestArgparse): def test_crush_tunables(self): for tunable in ('legacy', 'argonaut', 'bobtail', 'firefly', - 'optimal', 'default'): + 'optimal', 'default'): self.assert_valid_command(['osd', 'crush', 'tunables', tunable]) assert_equal({}, validate_command(sigdict, ['osd', 'crush', @@ -996,13 +996,13 @@ class TestOSD(TestArgparse): 'poolname', '128', '128', 'erasure', '^^^', - 'ruleset'])) + 'ruleset'])) assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create', 'poolname', '128', '128', 'erasure', 'profile', 'ruleset', - 'toomany'])) + 'toomany'])) assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create', 'poolname', '128', '128', @@ -1102,7 +1102,7 @@ class TestOSD(TestArgparse): def test_reweight_by_utilization(self): self.assert_valid_command(['osd', 'reweight-by-utilization']) self.assert_valid_command(['osd', 'reweight-by-utilization', '100']) - self.assert_valid_command(['osd', 'reweight-by-utilization', '100', '.1']) + self.assert_valid_command(['osd', 'reweight-by-utilization', '100', '.1']) self.assert_valid_command(['osd', 'reweight-by-utilization', '--no-increasing']) assert_equal({}, validate_command(sigdict, ['osd', 'reweight-by-utilization',