Merge lp:~jelmer/brz/flake8-cope into lp:brz/3.1

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 7657
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/flake8-cope
Merge into: lp:brz/3.1
Diff against target: 12 lines (+1/-1)
1 file modified
breezy/tests/test_source.py (+1/-1)
To merge this branch: bzr merge lp:~jelmer/brz/flake8-cope
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+395588@code.launchpad.net

Commit message

Handle SyntaxError when importing flake8 on older versions of Python 3.

Description of the change

Handle SyntaxError when importing flake8 on older versions of Python 3.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/tests/test_source.py'
2--- breezy/tests/test_source.py 2020-11-28 04:08:42 +0000
3+++ breezy/tests/test_source.py 2020-12-23 10:51:49 +0000
4@@ -327,7 +327,7 @@
5 def test_flake8(self):
6 try:
7 self.requireFeature(features.flake8)
8- except NameError:
9+ except (SyntaxError, NameError):
10 # importlib_metadata uses ModuleNotFoundError, which is
11 # python 3.6 only
12 if sys.version_info[:2] <= (3, 5):

Subscribers

People subscribed via source and target branches