mirror of
https://github.com/im-tomu/fomu-workshop.git
synced 2024-09-20 03:10:12 +00:00
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:
parent
6870876857
commit
4dc82da0e9
@ -592,7 +592,8 @@ elif "LXBUILDENV_REEXEC" not in os.environ:
|
||||
try:
|
||||
sys.exit(subprocess.Popen(
|
||||
[sys.executable] + [sys.argv[0]] + rest).wait())
|
||||
except:
|
||||
except Exception as e:
|
||||
print(e)
|
||||
sys.exit(1)
|
||||
else:
|
||||
# Overwrite the deps directory.
|
||||
|
Loading…
Reference in New Issue
Block a user