avoid cli crash if css file is passed that does not exist
svn: r12807
This commit is contained in:
parent
19ea036795
commit
31f923bab6
@ -284,8 +284,10 @@ class HtmlDoc(BaseDoc, TextDoc):
|
|||||||
tdfile.close()
|
tdfile.close()
|
||||||
#css file
|
#css file
|
||||||
if self.css_filename:
|
if self.css_filename:
|
||||||
self.copy_file(os.path.join(const.DATA_DIR, self.css_filename),
|
#we do an extra check in case file does not exist, eg cli call
|
||||||
_HTMLSCREEN)
|
fullpath = os.path.join(const.DATA_DIR, self.css_filename)
|
||||||
|
if os.path.exists(fullpath):
|
||||||
|
self.copy_file(fullpath, _HTMLSCREEN)
|
||||||
#favicon
|
#favicon
|
||||||
self.copy_file(os.path.join(const.IMAGE_DIR, 'favicon.ico'),
|
self.copy_file(os.path.join(const.IMAGE_DIR, 'favicon.ico'),
|
||||||
'favicon.ico')
|
'favicon.ico')
|
||||||
|
Loading…
Reference in New Issue
Block a user