Skip to content

Commit

Permalink
Exclude .git directory when iterating files
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongseokson committed Jan 3, 2016
1 parent 791d8bc commit b1c9405
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions buster/buster.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ def fixLinks(text, parser):
if arguments['--public'] is not None:
print "replace", arguments['--localhost'], "with", arguments['--public']
for root, dirs, filenames in os.walk(static_path):
if '.git' in dirs:
dirs.remove('.git')
for filename in filenames:
filepath = os.path.join(root, filename)
with open(filepath) as f:
Expand Down

0 comments on commit b1c9405

Please sign in to comment.