I did this for purpose.
Currently we don't have an api error to catch and we could have in this
place other errors then just the one described in 8410. I don't want to
solve other errors as this could cause not catching quite important
possible bugs and I do want to check if the error comed from not
existing URI. I am happy to remove try,except clausule, but at some
point this clauseule will need to appear in this place (once the api
will throw some error). Please let me know which way do you prefer?
Michal
jmr wrote:
Built and tested it - works fine Michal.
One question on the webrev:
You are not using origins here at all. Either you should be using the
lack of origins to trigger the error or just use the exception handler,
but not both.
+ origins = False
+ repo = pub.selected_repository
+ if repo and origins in repo.__dict__ and
len(repo.origins) > 0:
+ origins = True
+ try:
+
repo_gui.webinstall_new_pub(self.w_webinstall_dialog, pub)
+ except AttributeError:
+ msg = _("Failed to add %s.\n") % pub
+ msg += _("No URI specified")
+ self.__error_occurred(
+ self.w_webinstall_dialog,
+ msg, gtk.MESSAGE_ERROR,
_("Repository Error"))
JR
Michal Pryc wrote:
Hello,
The webrev:
http://cr.opensolaris.org/~migi/8410_v1/
Fixes bug:
http://defect.opensolaris.org/bz/show_bug.cgi?id=8410
I have created sample p5i file which should show the bug.
http://cr.opensolaris.org/~migi/as.p5i
Please download this file and open using command:
pfexec packagemanager /path/to/as.p5i
With this fix proper error dialog will occur. There is no l10n impact
as those strings were already in other places of the PM.
best
Michal Pryc
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss