Fix for #48.
Rework of how services are sorted based on dependencies using a topological sort. Includes error handling to detect circular/self imports (should raise a DependecyError). Added in logging to the CLI to log out any DependencyErrors. Removed the compact module as it is no longer used.
This commit is contained in:
parent
ee880ca7be
commit
ae7573b9b8
5 changed files with 139 additions and 39 deletions
|
|
@ -8,7 +8,7 @@ import signal
|
|||
from inspect import getdoc
|
||||
|
||||
from .. import __version__
|
||||
from ..project import NoSuchService
|
||||
from ..project import NoSuchService, DependencyError
|
||||
from ..service import CannotBeScaledError
|
||||
from .command import Command
|
||||
from .formatter import Formatter
|
||||
|
|
@ -40,10 +40,7 @@ def main():
|
|||
except KeyboardInterrupt:
|
||||
log.error("\nAborting.")
|
||||
exit(1)
|
||||
except UserError as e:
|
||||
log.error(e.msg)
|
||||
exit(1)
|
||||
except NoSuchService as e:
|
||||
except (UserError, NoSuchService, DependencyError) as e:
|
||||
log.error(e.msg)
|
||||
exit(1)
|
||||
except NoSuchCommand as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue