Improved publisher

This commit is contained in:
Sven Heidemann 2021-03-30 10:43:39 +02:00
parent 31fe1c5cd7
commit 5f36e0a43e

View File

@ -287,12 +287,14 @@ class PublisherService(PublisherABC):
os.remove(setup_file)
main = None
main_not_found = False
try:
main = importlib.import_module(self._build_settings.main)
except Exception as e:
Console.error('Could not find entry point', str(e))
main_not_found = True
if main is None or not hasattr(main, 'main'):
if (main is None or not hasattr(main, 'main')) and not main_not_found:
Console.error('Could not find entry point')
return