Author: lslezak Date: Tue Aug 30 16:11:31 2011 New Revision: 65454 URL: http://svn.opensuse.org/viewcvs/yast?rev=65454&view=rev Log: - webpin_package_search - display popup and print error message when HTTP response code is not 200, don't silently ignore errors (bnc#714546) Modified: trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/webpin_package_search.ycp trunk/packager/src/modules/WebpinPackageSearch.ycp Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=65454&r1=65453&r2=65454&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Tue Aug 30 16:11:31 2011 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Aug 30 14:03:01 UTC 2011 - lslezak@suse.cz + +- webpin_package_search - display popup and print error message + when HTTP response code is not 200, don't silently ignore errors + (bnc#714546) + +------------------------------------------------------------------- Mon Aug 29 16:15:53 CEST 2011 - locilka@suse.cz - Implemented possibility to set repository priority while adding Modified: trunk/packager/src/clients/webpin_package_search.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/webpin_package_search.ycp?rev=65454&r1=65453&r2=65454&view=diff ============================================================================== --- trunk/packager/src/clients/webpin_package_search.ycp (original) +++ trunk/packager/src/clients/webpin_package_search.ycp Tue Aug 30 16:11:31 2011 @@ -344,7 +344,10 @@ Popup::ClearFeedback(); PopulatePackageList( search_results ); - if ( search_results == $[] || search_results == nil ) + if (search_results == nil) + // error message + UI::ChangeWidget(`id("description"), `Value, _("<p><b>Search failed</b></p>")); + else if (search_results == $[]) UI::ChangeWidget(`id("description"), `Value, _("<p><b>No packages matching entered criteria were found</b></p>")); else CreatePackageDescription(); Modified: trunk/packager/src/modules/WebpinPackageSearch.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/WebpinPackageSearch.ycp?rev=65454&r1=65453&r2=65454&view=diff ============================================================================== --- trunk/packager/src/modules/WebpinPackageSearch.ycp (original) +++ trunk/packager/src/modules/WebpinPackageSearch.ycp Tue Aug 30 16:11:31 2011 @@ -25,6 +25,7 @@ import "URL"; import "XML"; import "Arch"; +import "Report"; string temporary_file = Directory::tmpdir + "/package_search_webpin.xml"; @@ -359,6 +360,8 @@ // is full of error messages - we should not let anyxml agent parse those if ( response["code"]:0 != 200 ) { y2error ("Cannot retrieve search results from the server"); + // %1 is HTTP error code like 404 or 503 + Report::Error(sformat(_("Search failed.\nRemote server returned error code %1"), response["code"]:0)); return nil; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org