Merge lp:~mvo/click/dont-crash-for-empty-db into lp:click/devel
Status: | Merged |
---|---|
Approved by: | Michael Vogt |
Approved revision: | 479 |
Merged at revision: | 560 |
Proposed branch: | lp:~mvo/click/dont-crash-for-empty-db |
Merge into: | lp:click/devel |
Diff against target: |
102 lines (+41/-3) 2 files modified
click/tests/test_database.py (+12/-0) lib/click/database.vala (+29/-3) |
To merge this branch: | bzr merge lp:~mvo/click/dont-crash-for-empty-db |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
click hackers | Pending | ||
Review via email: mp+224318@code.launchpad.net |
Commit message
Do not crash when no database configuration is used and Click.DB.
Description of the change
This branch adds checks into libclick to avoid crashing if no database configuration is loaded.
This is a better version of the (rightfully) reverted r474. I currently have a single error type for this. If you think the case "no database at all" and "invalid index in get()" should be seperate error types I'm happy to do that.
AIUI this is a ABI break as get() now throws a error when it wasn't before (i.e. a GError is now part of the get function signature). So we may need to defer this until the next abi break or return "null" or something instead of raising a error.
Thanks,
Michael
FAILED: Continuous integration, rev:478 /code.launchpad .net/~mvo/ click/dont- crash-for- empty-db/ +merge/ 224318/ +edit-commit- message
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http:// jenkins. qa.ubuntu. com/job/ click-devel- ci/4/ jenkins. qa.ubuntu. com/job/ click-devel- utopic- amd64-ci/ 4 jenkins. qa.ubuntu. com/job/ click-devel- utopic- armhf-ci/ 4 jenkins. qa.ubuntu. com/job/ click-devel- utopic- armhf-ci/ 4/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ click-devel- utopic- i386-ci/ 4
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/click- devel-ci/ 4/rebuild
http://