]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix tabs->whitespace in ceph_argparse
authorOleh Prypin <oleh@pryp.in>
Tue, 14 Jun 2016 21:50:20 +0000 (00:50 +0300)
committerNathan Cutler <ncutler@suse.com>
Sun, 24 Jul 2016 19:04:35 +0000 (21:04 +0200)
Signed-off-by: Oleh Prypin <oleh@pryp.in>
(cherry picked from commit bef2c83c1da7dcc32fc2ff98cf214fc93bef75b8)

src/pybind/ceph_argparse.py
src/test/pybind/test_ceph_argparse.py

index 0df7e394231206992f9c33e3d3c320ba0900b0c7..18a87183c2a93e6a00c4c93f737af98c6bf8c200 100644 (file)
@@ -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
index 4c325f278e52411068e831a3e1e22d1c1ea9592e..17cbddd2be742ea19d7896e213e70ff5a51b2aef 100755 (executable)
@@ -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',