Make portdbapi.aux_get() return float type for _mtime_. (trunk r10603)
authorZac Medico <zmedico@gentoo.org>
Mon, 9 Jun 2008 15:11:42 +0000 (15:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 9 Jun 2008 15:11:42 +0000 (15:11 -0000)
svn path=/main/branches/2.1.2/; revision=10618

pym/portage.py

index 97eddec57dfce2de0efe0add3003ce3ab1e28a11..1454c520d59f0c60e71bd8ec99d6b5450e281820 100644 (file)
@@ -7688,7 +7688,8 @@ class portdbapi(dbapi):
 
 
                try:
-                       emtime=os.stat(myebuild)[stat.ST_MTIME]
+                       st = os.stat(myebuild)
+                       emtime = st[stat.ST_MTIME]
                except OSError:
                        writemsg("!!! aux_get(): ebuild for '%(cpv)s' does not exist at:\n" % {"cpv":mycpv},
                                noiselevel=-1)
@@ -7784,6 +7785,8 @@ class portdbapi(dbapi):
                for x in mylist:
                        if x == "INHERITED":
                                returnme.append(' '.join(mydata.get("_eclasses_", [])))
+                       elif x == "_mtime_":
+                               returnme.append(st.st_mtime)
                        else:
                                returnme.append(mydata.get(x,""))