mirror of https://gitlab.com/bashrc2/epicyon
Use default image if not found
parent
c8c85915c2
commit
dcce90e8c0
|
@ -468,6 +468,16 @@ def _getImageFile(baseDir: str, name: str, directory: str,
|
|||
bannerExtensions = getImageExtensions()
|
||||
bannerFile = ''
|
||||
bannerFilename = ''
|
||||
for ext in bannerExtensions:
|
||||
bannerFileTest = name + '.' + ext
|
||||
bannerFilenameTest = directory + '/' + bannerFileTest
|
||||
if os.path.isfile(bannerFilenameTest):
|
||||
bannerFile = name + '_' + theme + '.' + ext
|
||||
bannerFilename = bannerFilenameTest
|
||||
return bannerFile, bannerFilename
|
||||
# if not found then use the default image
|
||||
theme = 'default'
|
||||
directory = baseDir + '/' + theme + '/default'
|
||||
for ext in bannerExtensions:
|
||||
bannerFileTest = name + '.' + ext
|
||||
bannerFilenameTest = directory + '/' + bannerFileTest
|
||||
|
|
Loading…
Reference in New Issue