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

don't modify values of 'paths' list passed as argument to prepend_paths #1300

Merged
merged 2 commits into from
Jun 16, 2015

Conversation

boegel
Copy link
Member

@boegel boegel commented Jun 16, 2015

I ran into this issue when using the updated PythonPackage easyblock from easybuilders/easybuild-easyblocks#628....

@@ -226,18 +226,21 @@ def prepend_paths(self, key, paths, allow_abs=False):
self.log.debug("Wrapping %s into a list before using it to prepend path %s" % (paths, key))
paths = [paths]

for i, path in enumerate(paths):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, we were changing the list while iterating over it? 👎

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we were updating elements in a list while iterating over it, which is OK

What's not OK is that we're modifying the list that is being passed to this method...

@hpcugentbot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/1777/
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/1777/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member Author

boegel commented Jun 16, 2015

Going in, thanks @wpoely86 for the review!

boegel added a commit that referenced this pull request Jun 16, 2015
don't modify values of 'paths' list passed as argument to prepend_paths
@boegel boegel merged commit df7cb20 into easybuilders:develop Jun 16, 2015
@boegel boegel deleted the purify_prepend_paths branch June 16, 2015 17:44
boegel added a commit to boegel/easybuild-framework that referenced this pull request Jul 2, 2015
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

Successfully merging this pull request may close these issues.

3 participants