Pass the file path into the PermissionDenied exception.
authorZac Medico <zmedico@gentoo.org>
Sun, 8 Jul 2007 16:44:47 +0000 (16:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 8 Jul 2007 16:44:47 +0000 (16:44 -0000)
svn path=/main/trunk/; revision=7204

pym/portage/dbapi/vartree.py

index 03db114b14dadf7832bc29e0e4104d82075eb333..d9107370547d196dde6eb65e4f07fd305999955c 100644 (file)
@@ -342,12 +342,13 @@ class vardbapi(dbapi):
                        cpc = self.cpcache[mycp]
                        if cpc[0] == mystat:
                                return cpc[1]
+               cat_dir = self.getpath(mysplit[0])
                try:
-                       dir_list = os.listdir(self.getpath(mysplit[0]))
+                       dir_list = os.listdir(cat_dir)
                except EnvironmentError, e:
                        from portage.exception import PermissionDenied
                        if e.errno == PermissionDenied.errno:
-                               raise PermissionDenied(e)
+                               raise PermissionDenied(cat_dir)
                        del e
                        dir_list = []