Merge lp:~adeuring/charmworld/better-handling-of-invalid-metadata-1169662 into lp:~juju-jitsu/charmworld/trunk
Proposed by
Abel Deuring
Status: | Merged |
---|---|
Approved by: | Richard Harding |
Approved revision: | 214 |
Merged at revision: | 215 |
Proposed branch: | lp:~adeuring/charmworld/better-handling-of-invalid-metadata-1169662 |
Merge into: | lp:~juju-jitsu/charmworld/trunk |
Diff against target: |
229 lines (+135/-12) 4 files modified
charmworld/jobs/ingest.py (+22/-10) charmworld/jobs/tests/test_ingest.py (+82/-0) charmworld/jobs/tests/test_scan.py (+27/-0) charmworld/testing/factory.py (+4/-2) |
To merge this branch: | bzr merge lp:~adeuring/charmworld/better-handling-of-invalid-metadata-1169662 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Richard Harding (community) | Approve | ||
Review via email: mp+161109@code.launchpad.net |
Commit message
ingest: stop processing charms with invalid metadata or config data.
Description of the change
This branch fixes the bugs 1169662 (UnboundLocalError: local variable
'metadata' referenced before assignment) and 1169660 (UnboundLocalError:
local variable 'config' referenced before assignment).
The cause of the bugs is simple: The ingest script just tried to
continue, even if the files metadata.yaml or config.yaml are invalid.
ScanJob now raises the new exception IngestError if these files cannot
be parsed; I changed the function run_job() to log the new exception
at level "info".
I also added a few trivial tests for run_job().
To post a comment you must log in.
thanks