From: Kefu Chai Date: Fri, 8 May 2020 03:10:56 +0000 (+0800) Subject: qa/tasks/cephfs: remove sys.exc_clear() calls X-Git-Tag: v14.2.10~17^2~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6e0527b485a5699e3b474da50f0a84401861fdfd;p=ceph.git qa/tasks/cephfs: remove sys.exc_clear() calls 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 (cherry picked from commit 702de9590cdfe6c95ef8e87cb74cd05944e380c9) --- diff --git a/qa/tasks/cephfs/test_snapshots.py b/qa/tasks/cephfs/test_snapshots.py index 88a23a0ae7e4e..f09b645c4c2a8 100644 --- a/qa/tasks/cephfs/test_snapshots.py +++ b/qa/tasks/cephfs/test_snapshots.py @@ -475,7 +475,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): @@ -501,7 +500,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