Commit 090177c2 authored by Paul Wise's avatar Paul Wise

Do not try to remove symlinks for sha1 hash type

The sha1 hash type is the target of symlinks,
not a source of symlinks.

Traceback (most recent call last):
  File "bin/remove-obsolete-new-packages", line 178, in <module>
    remove(hash_cache_path, 'symlink from %s cache' % hash_type)
  File "bin/remove-obsolete-new-packages", line 121, in remove
  File "/usr/lib/python3.5/", line 148, in dirname
    i = p.rfind(sep) + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
parent 32b4dd28
...@@ -175,6 +175,7 @@ for name, versions in data.items(): ...@@ -175,6 +175,7 @@ for name, versions in data.items():
get_basename(sha1_cache_path), get_basename(sha1_cache_path),
'changelog file') 'changelog file')
remove(sha1_cache_path, 'file from sha1 cache') remove(sha1_cache_path, 'file from sha1 cache')
if hash_cache_path:
remove(hash_cache_path, 'symlink from %s cache' % hash_type) remove(hash_cache_path, 'symlink from %s cache' % hash_type)
remove(changelog_path, 'changelog file') remove(changelog_path, 'changelog file')
try: try:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment