Make lxbuildenv.py return 0 on success.

`sys.exit` raises a `SystemExit` exception which causes a bare except to
always trigger. IE the below always prints hello.

```python
import sys
try:
	sys.exit(0)
except:
	print("Hello")
```

However, SystemExit doesn't inherit from Exception, so the following
works as expected.

```python
import sys
try:
	sys.exit(0)
except Exception:
	print("Hello")
```
This commit is contained in:
Tim 'mithro' Ansell 2020-01-05 09:10:14 -08:00
parent 6870876857
commit 4dc82da0e9

View File

@ -592,7 +592,8 @@ elif "LXBUILDENV_REEXEC" not in os.environ:
try: try:
sys.exit(subprocess.Popen( sys.exit(subprocess.Popen(
[sys.executable] + [sys.argv[0]] + rest).wait()) [sys.executable] + [sys.argv[0]] + rest).wait())
except: except Exception as e:
print(e)
sys.exit(1) sys.exit(1)
else: else:
# Overwrite the deps directory. # Overwrite the deps directory.