From 3e06f5c196fa23a195a03ebe23dd73272c05262c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 2 Mar 2018 11:04:58 +0100 Subject: [PATCH] Optimize write event responses by removing unused file content --- lib/tfw/components/source_code_event_handler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tfw/components/source_code_event_handler.py b/lib/tfw/components/source_code_event_handler.py index c8a8ad9..91b4fb3 100644 --- a/lib/tfw/components/source_code_event_handler.py +++ b/lib/tfw/components/source_code_event_handler.py @@ -71,6 +71,7 @@ class SourceCodeEventHandler(TriggerlessEventHandler): with self.monitor.pauser: try: self.filemanager.file_contents = data['content'] except Exception: log.exception('Error writing file!') + data['content'] = '' return data def select(self, data):