Better test for news avatar

This commit is contained in:
bashrc committed 2020-10-15 19:21:05 +01:00
1 parent 326e50ef0e
commit d096b04c04
1 file changed
+2 -3
+2 -3
View File
@@ -1025,9 +1025,8 @@ def setNewsAvatar(baseDir: str, name: str,
"""Sets the avatar for the news account
"""
nickname = 'news'
if name != 'default':
newFilename = baseDir + '/img/icons/' + name + '/avatar_news.png'
else:
newFilename = baseDir + '/img/icons/' + name + '/avatar_news.png'
if not os.path.isfile(newFilename):
newFilename = baseDir + '/img/icons/avatar_news.png'
if not os.path.isfile(newFilename):
return