Make sure that myid is defined for the previous commit.
authorZac Medico <zmedico@gentoo.org>
Thu, 4 Jan 2007 03:23:12 +0000 (03:23 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 4 Jan 2007 03:23:12 +0000 (03:23 -0000)
svn path=/main/trunk/; revision=5459

pym/getbinpkg.py

index 058919bf1fec29d396cbf6712259fffc8003259c..6939e4840e2085c83bbc3a471d428432bff20d84 100644 (file)
@@ -522,6 +522,7 @@ def dir_get_metadata(baseurl, conn=None, chunk_size=3000, verbose=1, usingcache=
                    (x not in metadata[baseurl]["data"].keys())):
                        sys.stderr.write(yellow("x"))
                        metadata[baseurl]["modified"] = 1
+                       myid = None
                        for retry in xrange(3):
                                try:
                                        myid = file_get_metadata(
@@ -536,7 +537,7 @@ def dir_get_metadata(baseurl, conn=None, chunk_size=3000, verbose=1, usingcache=
                                        conn, protocol, address, params, headers = create_conn(
                                                baseurl)
 
-                       if myid[0]:
+                       if myid and myid[0]:
                                metadata[baseurl]["data"][x] = make_metadata_dict(myid)
                        elif verbose:
                                sys.stderr.write(red("!!! Failed to retrieve metadata on: ")+str(x)+"\n")