mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 20:21:32 +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.)
|
:param exclude: list of filenames that should not appear between files (for *.o, *.pyc, etc.)
|
||||||
"""
|
"""
|
||||||
super().__init__(key)
|
super().__init__(key)
|
||||||
self.filemanager = FileManager(allowed_directories=allowed_directories, working_directory=directory,
|
try:
|
||||||
selected_file=selected_file, exclude=exclude)
|
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)
|
MonitorManagerMixin.__init__(self, DirectoryMonitor, self.filemanager.workdir)
|
||||||
|
|
||||||
self.commands = {'read': self.read,
|
self.commands = {'read': self.read,
|
||||||
|
Loading…
Reference in New Issue
Block a user