Browse files

Merge pull request #19 from fedora-infra/feature/handle_symlink

Feature/handle symlink
  • Loading branch information...
2 parents 7a40e15 + ad41054 commit 8bc52cdd5dbd3851c08bf0b96fd902f443cd08e8 @ralphbean ralphbean committed Feb 21, 2014
Showing with 4 additions and 0 deletions.
  1. +4 −0 summershum/utils.py
View
4 summershum/utils.py
@@ -102,6 +102,10 @@ def walk_directory(directory):
for filename in filenames:
file_path = os.path.join(root, filename)
+ # We skip the symlink, should we follow them instead?
+ if os.path.islink(file_path):
+ log.info("File %r is a link - skipping", file_path)
+ continue
with open(file_path) as stream:
contents = stream.read()
sha256sum = hashlib.sha256(contents).hexdigest()

0 comments on commit 8bc52cd

Please sign in to comment.