Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

build: setup: only try removing the working dir from the path if its …

…on it

The existance of a thrown exception in setup.py on my box was causing
a test failure for me:

ERROR: test_retry_kwargs_can_be_empty (celery.tests.tasks.test_tasks.test_task_retries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/unsecure/src/celery/celery/tests/tasks/test_tasks.py", line 133, in test_retry_kwargs_can_be_empty
    retry_task_mockapply.retry(args=[4, 4], kwargs=None)
  File "/var/unsecure/src/celery/celery/app/task.py", line 563, in retry
    maybe_reraise()
  File "setup.py", line 15, in <module>
    sys.path.remove(path)
ValueError: list.remove(x): x not in list
  • Loading branch information...
commit 282c5108480983e0cbcecad4d6f73bcd55349aad 1 parent eca46c4
@bpowers bpowers authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 setup.py
View
4 setup.py
@@ -11,10 +11,8 @@
try:
orig_path = sys.path[:]
for path in (os.path.curdir, os.getcwd()):
- try:
+ if path in sys.path:
sys.path.remove(path)
- except ValueError:
- pass
try:
import celery.app
import imp
Please sign in to comment.
Something went wrong with that request. Please try again.