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

fix catkin_find to not return path with '/.' suffix #621

Merged
merged 1 commit into from
Apr 28, 2014

Conversation

dirk-thomas
Copy link
Member

No description provided.

@wjwwood
Copy link
Member

wjwwood commented Apr 22, 2014

+1

p = os.path.join(source_path, matching_packages[0])
p = source_path
if matching_packages[0] != os.curdir:
p = os.path.join(p, matching_packages[0])
Copy link
Member

Choose a reason for hiding this comment

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

This would be easier to read with an if else instead of a reassignment

if matching...
p = os.path.join(source_path, matched...
else
p = source_path

And should these be elseifs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Especially when the expressions get more complex I actually don't like the duplication in both branches. And in this case it is actually doing something and conditionally appending something where the single if logic makes sense.

Therefore I will keep it as is.

Copy link
Member

Choose a reason for hiding this comment

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

I don't mind one style or the other.

@dirk-thomas
Copy link
Member Author

Needs to be backported.

dirk-thomas added a commit that referenced this pull request Apr 28, 2014
fix catkin_find to not return path with '/.' suffix
@dirk-thomas dirk-thomas merged commit dfde4aa into indigo-devel Apr 28, 2014
@dirk-thomas dirk-thomas deleted the fix_catkin_find branch April 28, 2014 04:12
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