[PATCH 6 of 7] tests: replace "naked except clause" to avoid check-code.py error

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sun Feb 17 12:19:29 EST 2019


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1550417245 -32400
#      Mon Feb 18 00:27:25 2019 +0900
# Node ID 4f1714df74136e8b46a35810e2e46a7d25b243a8
# Parent  617e8b6f8721d3f9ba351c614a47dfd287505704
# Available At https://bitbucket.org/foozy/mercurial-wip
#              hg pull https://bitbucket.org/foozy/mercurial-wip -r 4f1714df7413
# EXP-Topic tests-fix-check-code-errors
tests: replace "naked except clause" to avoid check-code.py error

This is a part of preparation to apply checking with check-code.py on
code fragments embedded in *.t test scripts.

diff --git a/tests/test-acl.t b/tests/test-acl.t
--- a/tests/test-acl.t
+++ b/tests/test-acl.t
@@ -38,7 +38,7 @@
   > def fakegetusers(ui, group):
   >     try:
   >         return acl._getusersorig(ui, group)
-  >     except:
+  >     except BaseException:
   >         return [b"fred", b"betty"]
   > acl._getusersorig = acl._getusers
   > acl._getusers = fakegetusers


More information about the Mercurial-devel mailing list