Don't use os.path.isdir() because it can swallow errors related to filesystem/disk corruption. (trunk r5851:5852)

svn path=/main/branches/2.1.2/; revision=5869
diff --git a/pym/portage.py b/pym/portage.py
index b7ba73f..25c4d7a 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5271,8 +5271,14 @@
 
 	def _aux_get(self, mycpv, wants):
 		mydir = os.path.join(self.root, VDB_PATH, mycpv)
-		if not os.path.isdir(mydir):
-			raise KeyError(mycpv)
+		try:
+			if not stat.S_ISDIR(os.stat(mydir).st_mode):
+				raise KeyError(mycpv)
+		except OSError, e:
+			if e.errno == errno.ENOENT:
+				raise KeyError(mycpv)
+			del e
+			raise
 		results = []
 		for x in wants:
 			try: