Merge lp://staging/~stefan-schwarzburg/qreator/qreator_vendor_plugins into lp://staging/qreator
Status: | Merged |
---|---|
Merged at revision: | 170 |
Proposed branch: | lp://staging/~stefan-schwarzburg/qreator/qreator_vendor_plugins |
Merge into: | lp://staging/qreator |
Diff against target: |
91 lines (+30/-4) 4 files modified
qreator/__init__.py (+11/-3) qreator/qrcodes/QRCodeSoftwareCenterApp.py (+8/-0) qreator_lib/__init__.py (+1/-1) qreator_lib/helpers.py (+10/-0) |
To merge this branch: | bzr merge lp://staging/~stefan-schwarzburg/qreator/qreator_vendor_plugins |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Planella | Approve | ||
Schwarzburg | Needs Information | ||
Review via email: mp+164632@code.staging.launchpad.net |
Description of the change
The implementation is a simplified version of my comment on https:/
Each plugin is responsible for checking for vendor compatibility (since we have only one at the moment, this seemed the simplest way and is also in line with the plugin idea). If the vendor compatibilty is not met, the plugin raises an VendorError, which is caught by the importer infrastrucuter.
This has at the moment nothing to do with the colors of the icons.
Also: I was not able to test this on non-ubuntu distros, but they should normally not be named "Ubuntu", and therefore the test wether this is "Ubuntu" should fail...
Nice work as usual, I like the approach.
Comments inline, just minor things:
21 + print "%s disabled due to missing vendor infrastructure." % (name,)
I wonder if we might want to use the logging system and just flag this as a warning message.
43 +
Additional whitespace here, just a nitpick, but it might be worth not introducing it.
67 + pass
Rather than passing here, do we want to perhaps print the warning in the exception as a central place, and let the plugins override the message?