update crawler to handle out of order listings
snapshots.l.o does't always list builds in a dependable order. For
example today's RFS's for nano are:
100
101
76
77
This makes the check fool-proof my doing a numerical comparision
diff --git a/crawler.py b/crawler.py
index 4498885..101995f 100755
--- a/crawler.py
+++ b/crawler.py
@@ -47,7 +47,7 @@
'''
# only analyze the last few builds
links = list_links(url, r'<a\s*href=[\'|"](\d+)\/[\'"].*?>')[:limit]
- for link in sorted(links, reverse=True):
+ for link in sorted(links, reverse=True, key=int):
build = list_rfs('%s/%s' %(url, link))
if build is not None:
return (link, build)
@@ -63,4 +63,4 @@
print " %s: %s" % hwpack
print "latest nano:"
- print " %s %s" % latest_rfs('http://snapshots.linaro.org/oneiric/linaro-o-nano')
+ print " %s %s" % latest_rfs('http://snapshots.linaro.org/precise/images/nano')