register_mac_type is called from the module level
Bug #1215446 reported by
Jeroen T. Vermeulen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Jeroen T. Vermeulen |
Bug Description
(At the time of writing, this code has not actually landed yet: https:/
This call is necessary on program startup, but it needs a database connection. Very impolite to do that from the module level — it'll try to connect to the database even when parsing the module, as typically happens during lint checks.
I suppose we could call it during start_up() instead. Tests may need a separate call.
Related branches
lp:~jtv/maas/register-mac-type
- Julian Edwards (community): Approve
-
Diff: 118 lines (+23/-6)4 files modifiedsrc/maasserver/fields.py (+1/-5)
src/maasserver/start_up.py (+5/-0)
src/maasserver/testing/testcase.py (+6/-0)
src/maasserver/tests/test_fields.py (+11/-1)
Changed in maas: | |
assignee: | nobody → Jeroen T. Vermeulen (jtv) |
status: | Triaged → In Progress |
milestone: | none → 13.10 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.