Skip to content
Snippets Groups Projects

Try a fix for issue #77

Merged André Anjos requested to merge issue-77 into master
1 file
+ 5
3
Compare changes
  • Side-by-side
  • Inline
+ 5
3
@@ -17,9 +17,11 @@ def main(scandir, dry_run):
if f.startswith('.'): continue
if not f.endswith('.tar.bz2'): continue
name, version, build_string = f[:-8].rsplit('-', 2)
build = build_string.rsplit('_')[-1]
hash_, build = build_string.rsplit('_')
pyver, _ = hash_.rsplit('h', 1)
name = os.path.basename(path) + '/' + name
if pyver: name += '/' + pyver
target = os.path.join(path, f)
betas.setdefault(name, []).append((
StrictVersion(version),
@@ -39,9 +41,9 @@ def main(scandir, dry_run):
keep_version, keep_build, _, _ = sorted_packages[-1]
for version, build, mtime, path in sorted_packages:
if version == keep_version and build == keep_build:
print('[keep] %s (%u)' % (path, mtime))
print('[keep] %s (time=%u)' % (path, mtime))
else:
print('remove %s (%u)' % (path, mtime))
print('remove %s (time=%u)' % (path, mtime))
if not dry_run: os.unlink(path)
Loading