Improve IdeHandler JSON API

This commit is contained in:
Kristóf Tóth 2019-09-02 16:21:19 +02:00
parent 701b918e6f
commit fab582505f

View File

@ -73,8 +73,8 @@ class IdeHandler:
LOG.error('IGNORING MESSAGE: Invalid message received: %s', message)
def read(self, message):
if message.get('files'):
self.filemanager.patterns = message['files']
if 'patterns' in message:
self.filemanager.patterns = message['patterns']
try:
message['filename'] = message.get('filename') or self.initial_file
message['content'] = self.filemanager.read_file(message['filename'])