mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 12:18:00 +00:00
lf_check.py : do not crash if cannot copy html to lf_check_latest.html
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -164,6 +164,7 @@ NOTE: for now to see stdout and stderr remove /home/lanforge from path.
|
|||||||
try:
|
try:
|
||||||
if self.production_run == True:
|
if self.production_run == True:
|
||||||
msg = message_txt.format(ip=self.host_ip_production)
|
msg = message_txt.format(ip=self.host_ip_production)
|
||||||
|
# for postfix from command line echo "My message" | mail -s subject user@candelatech.com
|
||||||
command = "echo \"{message}\" | mail -s \"{subject}\" {address}".format(
|
command = "echo \"{message}\" | mail -s \"{subject}\" {address}".format(
|
||||||
message=msg,
|
message=msg,
|
||||||
subject=mail_subject,
|
subject=mail_subject,
|
||||||
@@ -805,7 +806,10 @@ Example :
|
|||||||
#])
|
#])
|
||||||
|
|
||||||
# copy one directory above
|
# copy one directory above
|
||||||
shutil.copyfile(html_report, lf_check_latest_html)
|
try:
|
||||||
|
shutil.copyfile(html_report, lf_check_latest_html)
|
||||||
|
except:
|
||||||
|
print("check permissions on {lf_check_latest_html}".format(lf_check_latest_html=lf_check_latest_html))
|
||||||
shutil.copyfile(html_report, lf_check_html_report)
|
shutil.copyfile(html_report, lf_check_html_report)
|
||||||
|
|
||||||
# copy banner and logo
|
# copy banner and logo
|
||||||
|
|||||||
Reference in New Issue
Block a user