]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephfs: remove sys.exc_clear() calls 34956/head
authorKefu Chai <kchai@redhat.com>
Fri, 8 May 2020 03:10:56 +0000 (11:10 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 8 May 2020 03:21:22 +0000 (11:21 +0800)
sys.exc_clear() was removed in Python3, see
https://docs.python.org/3/whatsnew/3.0.html#index-22. so we should not
call it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/cephfs/test_snapshots.py

index 7cd91ce611f72f3e7c17ee0fc567942096f1f2e7..0a35d99d4d636bee81e39cc7bcb0f243416cd547 100644 (file)
@@ -470,7 +470,6 @@ class TestSnapshots(CephFSTestCase):
                 # failing at the last mkdir beyond the limit is expected
                 if sno == snaps:
                     log.info("failed while creating snap #{}: {}".format(sno, repr(e)))
-                    sys.exc_clear()
                     raise TestSnapshots.SnapLimitViolationException(sno)
 
     def test_mds_max_snaps_per_dir_default_limit(self):
@@ -496,7 +495,6 @@ class TestSnapshots(CephFSTestCase):
             self.create_dir_and_snaps("accounts", new_limit + 1)
         except TestSnapshots.SnapLimitViolationException as e:
             if e.failed_snapshot_number == (new_limit + 1):
-                sys.exc_clear()
                 pass
         # then increase the limit by one and test
         new_limit = new_limit + 1