commit:     6be76dbe08c507fc54079ddbc26866bde80fc936
Author:     Pavlos Ratis <dastergon <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 24 13:11:07 2014 +0000
Commit:     Pavlos Ratis <dastergon <AT> gentoo <DOT> org>
CommitDate: Mon Nov 24 13:15:39 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=6be76dbe

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 <AT> gentoo.org>

---
 packages-inheriting-eclasses.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

Reply via email to