diff options
author | Tobias Markmann <tm@ayena.de> | 2016-04-25 19:43:29 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-04-25 19:43:29 (GMT) |
commit | 857791adda753a0f94da8317bbc019378b1f09bd (patch) | |
tree | 96aa2e4d863d50888a16527f9fbb38712e97d8ee /BuildTools/Gource | |
parent | b58ad7f4b01623a8807b8c268208bd9c8496f4e2 (diff) | |
download | swift-857791adda753a0f94da8317bbc019378b1f09bd.zip swift-857791adda753a0f94da8317bbc019378b1f09bd.tar.bz2 |
Convert hard tabs to four spaces in all our SConscript/*.py files
Test-Information:
Test that it still builds and unit test pass on OS X 10.11.4.
Change-Id: I2eb4a0b707991aee553db36a8cd1ae28b813acab
Diffstat (limited to 'BuildTools/Gource')
-rwxr-xr-x | BuildTools/Gource/GetGravatars.py | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/BuildTools/Gource/GetGravatars.py b/BuildTools/Gource/GetGravatars.py index 47f8a68..d1f40a4 100755 --- a/BuildTools/Gource/GetGravatars.py +++ b/BuildTools/Gource/GetGravatars.py @@ -5,8 +5,8 @@ import subprocess, os, sys, hashlib, urllib GRAVATAR_URL = "http://www.gravatar.com/avatar/%(id)s?d=404" if len(sys.argv) != 2 : - print "Usage: " + sys.argv[0] + " <output-dir>" - sys.exit(-1) + print "Usage: " + sys.argv[0] + " <output-dir>" + sys.exit(-1) output_dir = sys.argv[1] @@ -14,36 +14,36 @@ output_dir = sys.argv[1] authors = {} p = subprocess.Popen("git log --pretty=format:'%ae|%an'", shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=(os.name != "nt")) for line in p.stdout.readlines() : - author_components = line.rstrip().split("|") - authors[author_components[0]] = author_components[1] + author_components = line.rstrip().split("|") + authors[author_components[0]] = author_components[1] p.stdin.close() if p.wait() != 0 : - print "Error" - sys.exit(-1) + print "Error" + sys.exit(-1) # Get & save the avatars if not os.path.isdir(output_dir) : - os.makedirs(output_dir) + os.makedirs(output_dir) for email, name in authors.items() : - print "Processing avatar for " + name + " <" + email + ">" - filename = os.path.join(output_dir, name + ".png") - if os.path.isfile(filename) : - print "-> Already there. Skipping." - continue + print "Processing avatar for " + name + " <" + email + ">" + filename = os.path.join(output_dir, name + ".png") + if os.path.isfile(filename) : + print "-> Already there. Skipping." + continue - m = hashlib.md5() - m.update(email) - url = GRAVATAR_URL % {"id" : m.hexdigest()} - print "- Downloading " + url - f = urllib.urlopen(url) - input = None - if f.getcode() == 200 : - input = f.read() - f.close() - if input : - print "- Saving file " + filename - f = open(filename, "w") - f.write(input) - f.close() - else : - print "- No Gravatar found" + m = hashlib.md5() + m.update(email) + url = GRAVATAR_URL % {"id" : m.hexdigest()} + print "- Downloading " + url + f = urllib.urlopen(url) + input = None + if f.getcode() == 200 : + input = f.read() + f.close() + if input : + print "- Saving file " + filename + f = open(filename, "w") + f.write(input) + f.close() + else : + print "- No Gravatar found" |