Mercurial > hg-stable
comparison tests/test-acl.t @ 41746:cab32f08c994
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.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 18 Feb 2019 00:27:25 +0900 |
parents | b6673e9bdcf6 |
children | d7304434390f |
comparison
equal
deleted
inserted
replaced
41745:9897e95b0b4a | 41746:cab32f08c994 |
---|---|
36 > cat > fakegroups.py <<EOF | 36 > cat > fakegroups.py <<EOF |
37 > from hgext import acl | 37 > from hgext import acl |
38 > def fakegetusers(ui, group): | 38 > def fakegetusers(ui, group): |
39 > try: | 39 > try: |
40 > return acl._getusersorig(ui, group) | 40 > return acl._getusersorig(ui, group) |
41 > except: | 41 > except BaseException: |
42 > return [b"fred", b"betty"] | 42 > return [b"fred", b"betty"] |
43 > acl._getusersorig = acl._getusers | 43 > acl._getusersorig = acl._getusers |
44 > acl._getusers = fakegetusers | 44 > acl._getusers = fakegetusers |
45 > EOF | 45 > EOF |
46 > rm -f acl.config | 46 > rm -f acl.config |