Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_jslint task doesn't find any files unless ... #40

Closed
flc opened this issue Jul 21, 2011 · 1 comment
Closed

run_jslint task doesn't find any files unless ... #40

flc opened this issue Jul 21, 2011 · 1 comment
Milestone

Comments

@flc
Copy link

flc commented Jul 21, 2011

diff --git a/django_jenkins/tasks/run_jslint.py b/django_jenkins/tasks/run_jslint.py
index 634f0ae..1cfd7bb 100644
--- a/django_jenkins/tasks/run_jslint.py
+++ b/django_jenkins/tasks/run_jslint.py
@@ -65,7 +65,8 @@ class Task(BaseTask):
             from django.contrib.staticfiles import finders

             for finder in finders.get_finders():
-                for path, _ in finder.list(self.exclude):
+                for path, storage in finder.list(self.exclude):
+                    path = os.path.join(storage.location, path)
                     if path.endswith('.js') and in_tested_locations(path):
                         yield path
         else:

path returned by finder.list() contains only the relative path to the static dir (eg.: js/foo.js) so you have to join it with the storage's location (eg.: app_dir/static). if you don't do that the in_tested_locations() check will always returns False.

@kmmbvnr
Copy link
Owner

kmmbvnr commented Jul 21, 2011

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants