1
0
Fork 0

Merge pull request #2363 from tobiasd/2016ß217-credits

make_credits.py: handle exception with non-existing addon directory
This commit is contained in:
fabrixxm 2016-02-17 09:01:29 +01:00
commit fb28713ca3

View file

@ -46,17 +46,20 @@ for i in c:
n1 = len(contributors) n1 = len(contributors)
print(' > found %d contributors' % n1) print(' > found %d contributors' % n1)
# get the contributors to the addons # get the contributors to the addons
os.chdir(path+'/addon') try:
# get the contributors os.chdir(path+'/addon')
print('> getting contributors to the addons') # get the contributors
p = subprocess.Popen(['git', 'shortlog', '--no-merges', '-s'], print('> getting contributors to the addons')
stdout=subprocess.PIPE, p = subprocess.Popen(['git', 'shortlog', '--no-merges', '-s'],
stderr=subprocess.STDOUT) stdout=subprocess.PIPE,
c = iter(p.stdout.readline, b'') stderr=subprocess.STDOUT)
for i in c: c = iter(p.stdout.readline, b'')
name = i.decode().split('\t')[1].split('\n')[0] for i in c:
if not name in contributors and name not in dontinclude: name = i.decode().split('\t')[1].split('\n')[0]
contributors.append(name) if not name in contributors and name not in dontinclude:
contributors.append(name)
except FileNotFoundError:
print(' > no addon directory found ( THE LIST OF CONTRIBUTORS WILL BE INCOMPLETE )')
n2 = len(contributors) n2 = len(contributors)
print(' > found %d new contributors' % (n2-n1)) print(' > found %d new contributors' % (n2-n1))
print('> total of %d contributors to the repositories of friendica' % n2) print('> total of %d contributors to the repositories of friendica' % n2)