Exit code is 0 on ImportError #282

Closed
sterago opened this Issue Aug 14, 2012 · 4 comments

Comments

Projects
None yet
3 participants
@sterago

sterago commented Aug 14, 2012

Hi there,

shouldn't the exit code be non-zero when there is an uncatched ImportError during the tests execution?

We are using lettuce within a TeamCity CI server setup and the lettuce step is passing even if the execution failed due to such errors.

To reproduce:
in terrain.py
import non_existing_module

./manage.py harvest

echo $?

Cheers

Stefano

@adaschevici

This comment has been minimized.

Show comment Hide comment
@adaschevici

adaschevici Dec 17, 2013

Collaborator

Seems to have been fxed i think this can be closed.

(lettuce_hacking)hackawaye@hackawaye-Lenovo-IdeaPad-Y570:~/PycharmProjects/good_app$ python manage.py harvest
Lettuce has tried to load the conventional environment module "terrain"
but it has errors, check its contents and try to run lettuce again.

Original traceback below:

Traceback (most recent call last):
File "/home/hackawaye/virtual_envs/lettuce_hacking/local/lib/python2.7/site-packages/lettuce-0.2.19-py2.7.egg/lettuce/init.py", line 72, in
terrain = fs.FileSystem._import("terrain")
File "/home/hackawaye/virtual_envs/lettuce_hacking/local/lib/python2.7/site-packages/lettuce-0.2.19-py2.7.egg/lettuce/fs.py", line 84, in _import
module = imp.load_module(name, fp, pathname, description)
File "/home/hackawaye/PycharmProjects/good_app/terrain.py", line 2, in
import inexistent_module
ImportError: No module named inexistent_module
(lettuce_hacking)hackawaye@hackawaye-Lenovo-IdeaPad-Y570:/PycharmProjects/good_app$ echo $?
1
(lettuce_hacking)hackawaye@hackawaye-Lenovo-IdeaPad-Y570:
/PycharmProjects/good_app$

https://gist.github.com/adaschevici/8006543

Collaborator

adaschevici commented Dec 17, 2013

Seems to have been fxed i think this can be closed.

(lettuce_hacking)hackawaye@hackawaye-Lenovo-IdeaPad-Y570:~/PycharmProjects/good_app$ python manage.py harvest
Lettuce has tried to load the conventional environment module "terrain"
but it has errors, check its contents and try to run lettuce again.

Original traceback below:

Traceback (most recent call last):
File "/home/hackawaye/virtual_envs/lettuce_hacking/local/lib/python2.7/site-packages/lettuce-0.2.19-py2.7.egg/lettuce/init.py", line 72, in
terrain = fs.FileSystem._import("terrain")
File "/home/hackawaye/virtual_envs/lettuce_hacking/local/lib/python2.7/site-packages/lettuce-0.2.19-py2.7.egg/lettuce/fs.py", line 84, in _import
module = imp.load_module(name, fp, pathname, description)
File "/home/hackawaye/PycharmProjects/good_app/terrain.py", line 2, in
import inexistent_module
ImportError: No module named inexistent_module
(lettuce_hacking)hackawaye@hackawaye-Lenovo-IdeaPad-Y570:/PycharmProjects/good_app$ echo $?
1
(lettuce_hacking)hackawaye@hackawaye-Lenovo-IdeaPad-Y570:
/PycharmProjects/good_app$

https://gist.github.com/adaschevici/8006543

@sterago

This comment has been minimized.

Show comment Hide comment
@sterago

sterago Dec 17, 2013

Thanks for the heads up!

sterago commented Dec 17, 2013

Thanks for the heads up!

@adaschevici

This comment has been minimized.

Show comment Hide comment
@adaschevici

adaschevici Dec 17, 2013

Collaborator

You're welcome. And btw i was using the lettuce installed from sources so if you are using an older version you may want to double check.

Collaborator

adaschevici commented Dec 17, 2013

You're welcome. And btw i was using the lettuce installed from sources so if you are using an older version you may want to double check.

@adaschevici

This comment has been minimized.

Show comment Hide comment
@adaschevici

adaschevici Jan 16, 2014

Collaborator

@gabrielfalcao I believe this can be closed as it does not show in the latest sources.

Collaborator

adaschevici commented Jan 16, 2014

@gabrielfalcao I believe this can be closed as it does not show in the latest sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment