aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlos Ratis <dastergon@gentoo.org>2014-11-24 15:11:07 +0200
committerPavlos Ratis <dastergon@gentoo.org>2014-11-24 15:15:39 +0200
commit6be76dbe08c507fc54079ddbc26866bde80fc936 (patch)
treeccd20f0dc3a2009108577711b42fe91ad53fdbc5
parentdereference symlinks when needed (diff)
downloadqa-scripts-6be76dbe08c507fc54079ddbc26866bde80fc936.tar.gz
qa-scripts-6be76dbe08c507fc54079ddbc26866bde80fc936.tar.bz2
qa-scripts-6be76dbe08c507fc54079ddbc26866bde80fc936.zip
fix packages-inheriting-eclasses script from failing getting timestamp
Pkgcore doesn't support repos.conf yet. As a result it fails to get the timestamp from syncer. I switched timestamp handling from pkgcore to os.path.getmtime. Signed-off-by: Pavlos Ratis <dastergon@gentoo.org>
-rwxr-xr-xpackages-inheriting-eclasses.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages-inheriting-eclasses.py b/packages-inheriting-eclasses.py
index c2ae5ae..eace643 100755
--- a/packages-inheriting-eclasses.py
+++ b/packages-inheriting-eclasses.py
@@ -49,7 +49,7 @@ def main(argv):
<li><a href="/">/ (go back)</a></li>
</ul>
</body>
-</html>''' % (max([len(e) for e in output]), datetime.datetime.fromtimestamp(c.syncer['sync:%s' % portdir.location].current_timestamp()), '\n'.join(['<li><a href="%s.txt">%s.eclass</a> (%d packages),</li>' % (e, e, len(output[e])) for e in sorted(output)])))
+</html>''' % (max([len(e) for e in output]), datetime.datetime.fromtimestamp(os.path.getmtime(portdir.location)).strftime("%a %b %d %Y %H:%M:%S"), '\n'.join(['<li><a href="%s.txt">%s.eclass</a> (%d packages),</li>' % (e, e, len(output[e])) for e in sorted(output)])))
f.close()
return 0