diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-23 18:46:11 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-23 18:46:11 +0900 |
commit | 041961374b799e3369563538a3a6d6f14237c157 (patch) | |
tree | 235551cc1a070aaccb447f4f525583dd50675a03 /buildstream | |
parent | 1bdf0451a0b74612660686f5cf31cbc5549506e1 (diff) | |
download | buildstream-041961374b799e3369563538a3a6d6f14237c157.tar.gz |
_frontend/main.py: Consistent exit code when exceptions occur.
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/_frontend/main.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py index c05c44135..2a74727e4 100644 --- a/buildstream/_frontend/main.py +++ b/buildstream/_frontend/main.py @@ -669,13 +669,13 @@ def workspace_list(app): context.load(config) except _BstError as e: click.echo("Error loading user configuration: {}".format(e)) - sys.exit(1) + sys.exit(-1) try: project = Project(directory, context) except _BstError as e: click.echo("Error loading project: {}".format(e)) - sys.exit(1) + sys.exit(-1) workspaces = [] for element_name, source_index, directory in project._list_workspaces(): @@ -772,7 +772,7 @@ class App(): self.context.load(config) except _BstError as e: click.echo("Error loading user configuration: %s" % str(e)) - sys.exit(1) + sys.exit(-1) # Override things in the context from our command line options, # the command line when used, trumps the config files. @@ -830,7 +830,7 @@ class App(): self.project = Project(directory, self.context) except _BstError as e: click.echo("Error loading project: %s" % str(e)) - sys.exit(1) + sys.exit(-1) try: self.pipeline = Pipeline(self.context, self.project, target, @@ -842,7 +842,7 @@ class App(): cache_ticker=self.cache_ticker) except _BstError as e: click.echo("Error loading pipeline: %s" % str(e)) - sys.exit(1) + sys.exit(-1) # Create our status printer, only available in interactive self.status = Status(self.content_profile, self.format_profile, |