From: Fabian Groffen Date: Thu, 8 Nov 2007 21:58:39 +0000 (-0000) Subject: Don't terminate with a backtrace when a 404 is encountered. This X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=0bf15b796486f2197d33edd56256aba2f054c7a2;p=portage.git Don't terminate with a backtrace when a 404 is encountered. This try/catch makes it just slighlty better, but not really as nice as it should be (lots of misalignment, redundant/double data and missing data): % emerge -Kgp gawk These are the packages that would be merged, in order: Calculating dependencies - Fetching binary packages info... !!! Unable to get listing: 404 Server did not respond successfully (404: Not Found) -- DONE! ... done! svn path=/main/branches/prefix/; revision=8463 --- diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py index 64f9ade51..4261d7c78 100644 --- a/pym/portage/getbinpkg.py +++ b/pym/portage/getbinpkg.py @@ -480,7 +480,13 @@ def dir_get_metadata(baseurl, conn=None, chunk_size=3000, verbose=1, usingcache= if not metadata[baseurl].has_key("data"): metadata[baseurl]["data"]={} - filelist = dir_get_list(baseurl, conn) + try: + filelist = dir_get_list(baseurl, conn) + except Exception, e: + sys.stderr.write("!!! "+str(e)+"\n") + sys.stderr.flush() + return metadata[baseurl]["data"] + tbz2list = match_in_array(filelist, suffix=".tbz2") metalist = match_in_array(filelist, prefix="metadata.idx") del filelist