handle exception with non-existing addon directory

This commit is contained in:
Tobias Diekershoff 2016-02-17 08:00:38 +01:00
parent 406b141e22
commit b21275ee9c

View file

@ -46,6 +46,7 @@ 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
try:
os.chdir(path+'/addon') os.chdir(path+'/addon')
# get the contributors # get the contributors
print('> getting contributors to the addons') print('> getting contributors to the addons')
@ -57,6 +58,8 @@ for i in c:
name = i.decode().split('\t')[1].split('\n')[0] name = i.decode().split('\t')[1].split('\n')[0]
if not name in contributors and name not in dontinclude: if not name in contributors and name not in dontinclude:
contributors.append(name) 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)