Only copy default avatar if it exists

master
Bob Mottram 2019-07-21 13:29:36 +01:00
parent 4ca83d24c0
commit 314a3aa047
1 changed files with 2 additions and 1 deletions

View File

@ -232,7 +232,8 @@ def createPerson(baseDir: str,nickname: str,domain: str,port: int, \
setRole(baseDir,nickname,domain,'instance','admin')
setRole(baseDir,nickname,domain,'instance','moderator')
setRole(baseDir,nickname,domain,'instance','delegator')
copyfile(baseDir+'/img/default-avatar.png',baseDir+'/accounts/'+nickname+'@'+domain+'/avatar.png')
if os.path.isfile(baseDir+'/img/default-avatar.png'):
copyfile(baseDir+'/img/default-avatar.png',baseDir+'/accounts/'+nickname+'@'+domain+'/avatar.png')
return privateKeyPem,publicKeyPem,newPerson,webfingerEndpoint
def createSharedInbox(baseDir: str,nickname: str,domain: str,port: int, \