Fixed a bug that would crash Fenrir if the clipboard was empty on export to file.
This commit is contained in:
parent
7cadae70b6
commit
399f021475
@ -162,7 +162,11 @@ class remoteManager():
|
|||||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||||
return
|
return
|
||||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||||
clipboardFile.write(clipboard)
|
# Fenrir will crash if the clipboard variable is type None
|
||||||
|
if clipboard is not None:
|
||||||
|
clipboardFile.write(clipboard)
|
||||||
|
else:
|
||||||
|
clipboardFile.write('')
|
||||||
clipboardFile.close()
|
clipboardFile.close()
|
||||||
os.chmod(clipboardFilePath, 0o666)
|
os.chmod(clipboardFilePath, 0o666)
|
||||||
self.env['runtime']['outputManager'].presentText(_('clipboard exported to file'), interrupt=True)
|
self.env['runtime']['outputManager'].presentText(_('clipboard exported to file'), interrupt=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user