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

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Feb. 17, 2019, 5:19 p.m.
Message ID <4f1714df74136e8b46a3.1550423969@footprints>
Download mbox | patch
Permalink /patch/38802/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - Feb. 17, 2019, 5:19 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@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.

Patch

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