SaveFigureThread, does not attach files when there is no write permission

This commit is contained in:
2023-09-26 13:48:54 +02:00
parent 8c26ec4c15
commit e3eca94b0f

View File

@@ -129,7 +129,7 @@ class BaseWindow(QMainWindow):
_dirname = os.path.dirname(save_dest)
if os.access(_dirname, os.W_OK):
print("We have write permission", flush=True)
all_fig_data[canvas][idx].savefig(save_dest)
elif not write_message_fired:
@@ -138,7 +138,7 @@ class BaseWindow(QMainWindow):
"host {1}. Images not saved and " +
"cannot be sent to elog").format(
_dirname, os.uname()[1])
print(_mess, flush=True)
self.parent.trigger_log_message.emit(
MsgSeverity.WARN.name, _pymodule,
_line(), _mess, {})