Mailinglist Archive: yast-commit (1771 mails)

< Previous Next >
[yast-commit] r58486 - in /trunk/packager: package/yast2-packager.changes src/clients/webpin_package_search.ycp src/modules/WebpinPackageSearch.ycp
  • From: kmachalkova@xxxxxxxxxxxxxxxx
  • Date: Thu, 03 Sep 2009 10:49:11 -0000
  • Message-id: <E1Mj9sO-0005Tm-3b@xxxxxxxxxxxxxxxx>
Author: kmachalkova
Date: Thu Sep 3 12:49:11 2009
New Revision: 58486

URL: http://svn.opensuse.org/viewcvs/yast?rev=58486&view=rev
Log:
Handle server-side errors, do not let anyxml agent
parse the file with error msgs

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=58486&r1=58485&r2=58486&view=diff
==============================================================================
--- trunk/packager/package/yast2-packager.changes (original)
+++ trunk/packager/package/yast2-packager.changes Thu Sep 3 12:49:11 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Sep 3 12:45:44 CEST 2009 - kmachalkova@xxxxxxx
+
+- Handle server-side errors in webpin search (HTTP 500 mostly), do
+ not let anyxml agent parse non-XML file (bnc#526225)
+
+-------------------------------------------------------------------
Tue Aug 25 13:57:21 CEST 2009 - kmachalkova@xxxxxxx

- Prompt for installing packager-webpin if requested and not there

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=58486&r1=58485&r2=58486&view=diff
==============================================================================
--- trunk/packager/src/clients/webpin_package_search.ycp (original)
+++ trunk/packager/src/clients/webpin_package_search.ycp Thu Sep 3 12:49:11
2009
@@ -341,7 +341,7 @@
Popup::ClearFeedback();
PopulatePackageList( search_results );

- if ( search_results == $[] )
+ if ( search_results == $[] || search_results == nil )
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=58486&r1=58485&r2=58486&view=diff
==============================================================================
--- trunk/packager/src/modules/WebpinPackageSearch.ycp (original)
+++ trunk/packager/src/modules/WebpinPackageSearch.ycp Thu Sep 3 12:49:11 2009
@@ -351,9 +351,17 @@

y2milestone ("HTTP::Get (%1, %2)", url, temporary_file);
map response = HTTP::Get (url, temporary_file);
+ y2milestone ("Server response: %1", response);

list <map> ret_list = [];

+ // something's screwed up on server side - this usually means that tmp file
+ // 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");
+ return nil;
+ }
+
if (! FileUtils::Exists (temporary_file)) {
y2error ("Cannot read file: %1", temporary_file);
return nil;

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages