Merge lp:~cjwatson/brz-builder/no-imp into lp:brz-builder

Proposed by Colin Watson
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 184
Merged at revision: 185
Proposed branch: lp:~cjwatson/brz-builder/no-imp
Merge into: lp:brz-builder
Diff against target: 27 lines (+2/-4)
2 files modified
bin/brz-build-daily-recipe (+1/-2)
bin/brz-build-recipe (+1/-2)
To merge this branch: bzr merge lp:~cjwatson/brz-builder/no-imp
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+412277@code.launchpad.net

Commit message

Stop using deprecated "imp" module.

Description of the change

Simply importing brzbuildrecipe/__init__.py does very little work, so we might as well just try importing it rather than doing any more complicated import machinery shenanigans.

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 'bin/brz-build-daily-recipe'
2--- bin/brz-build-daily-recipe 2018-06-24 00:09:57 +0000
3+++ bin/brz-build-daily-recipe 2021-11-23 15:52:39 +0000
4@@ -20,8 +20,7 @@
5 import sys
6
7 try:
8- import imp
9- imp.find_module("brzbuildrecipe")
10+ import brzbuildrecipe # noqa: F401
11 except ImportError:
12 # Support running from the build tree.
13 sys.path.insert(0, os.path.join(sys.path[0], os.pardir))
14
15=== modified file 'bin/brz-build-recipe'
16--- bin/brz-build-recipe 2018-06-24 00:09:57 +0000
17+++ bin/brz-build-recipe 2021-11-23 15:52:39 +0000
18@@ -20,8 +20,7 @@
19 import sys
20
21 try:
22- import imp
23- imp.find_module("brzbuildrecipe")
24+ import brzbuildrecipe # noqa: F401
25 except ImportError:
26 # Support running from the build tree.
27 sys.path.insert(0, os.path.join(sys.path[0], os.pardir))

Subscribers

People subscribed via source and target branches

to all changes: