[test] Use ignore_errors=True in shutil.rmtree instead of try/except/pass
authorDenis Laxalde <denis.laxalde@logilab.fr>
Mon, 30 Oct 2017 09:16:07 +0100
changeset 12222 52f395015ff9
parent 12221 7254c153b5ce
child 12223 79d243a2f0c5
[test] Use ignore_errors=True in shutil.rmtree instead of try/except/pass
cubicweb/server/test/unittest_ldapsource.py
--- a/cubicweb/server/test/unittest_ldapsource.py	Mon Oct 30 09:13:02 2017 +0100
+++ b/cubicweb/server/test/unittest_ldapsource.py	Mon Oct 30 09:16:07 2017 +0100
@@ -105,10 +105,7 @@
             sys.stdout.write(stdout)
             sys.stderr.write(stderr)
         config.info('DONE')
-    try:
-        shutil.rmtree(cls._tmpdir)
-    except:
-        pass
+    shutil.rmtree(cls._tmpdir, ignore_errors=True)
 
 
 def ldapsource(cnx):