mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-22 21:51:56 +00:00
Raise comprehendable exception from webide when no files are present
This commit is contained in:
parent
8396c10a7b
commit
06e17a6591
@ -111,8 +111,11 @@ class IdeEventHandler(EventHandlerBase, MonitorManagerMixin):
|
||||
:param exclude: list of filenames that should not appear between files (for *.o, *.pyc, etc.)
|
||||
"""
|
||||
super().__init__(key)
|
||||
self.filemanager = FileManager(allowed_directories=allowed_directories, working_directory=directory,
|
||||
selected_file=selected_file, exclude=exclude)
|
||||
try:
|
||||
self.filemanager = FileManager(allowed_directories=allowed_directories, working_directory=directory,
|
||||
selected_file=selected_file, exclude=exclude)
|
||||
except IndexError:
|
||||
raise EnvironmentError(f'No file(s) in IdeEventHandler working_directory "{directory}"!')
|
||||
MonitorManagerMixin.__init__(self, DirectoryMonitor, self.filemanager.workdir)
|
||||
|
||||
self.commands = {'read': self.read,
|
||||
|
Loading…
Reference in New Issue
Block a user