-
Notifications
You must be signed in to change notification settings - Fork 519
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
Raise exception if appropriate bson module is installed. #270
Conversation
This wrong BSON library thing tripped me up for quite a while. I really appreciate the PR |
ping |
rospy.logerr("BSON installation does not support all necessary features. " | ||
"Please use the MongoDB BSON implementation.") | ||
rospy.signal_shutdown("shutdown") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not complain if the node is default mode(b64).
Can you add this error only when either bson_only_mode
is True
or [binary_encoder_type](https://github.com/RobotWebTools/rosbridge_suite/blob/develop/rosbridge_library/src/rosbridge_library/internal/message_conversion.py#L73 is bson
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review. I'll fix it.
if not appropriate_bson_installed(): | ||
rospy.logerr("BSON installation does not support all necessary features. " | ||
"Please use the MongoDB BSON implementation.") | ||
rospy.signal_shutdown("shutdown") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
rospy.logerr("BSON installation does not support all necessary features. " | ||
"Please use the MongoDB BSON implementation.") | ||
rospy.signal_shutdown("shutdown") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too.
@ledmonster sorry I just realized that all reviews were in pending. Could you change the requested in review? |
…node. (RobotWebTools#198) Check whether mongodb oriented bson is installed or not just after init_node, and if appropriate bson is not installed, shutdown node with error message. See: RobotWebTools#198
2bd0d79
to
c94a91b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jihoonl I have totally changed the code. Could you please review again?
As to bson_only_mode
or binary_encoder_type
, even if binary_encoder_type
is not bson
, bson
is imported and used in many places. So I think it's better to always check bson.
rospy.logerr("BSON installation does not support all necessary features. " | ||
"Please use the MongoDB BSON implementation.") | ||
rospy.signal_shutdown("shutdown") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review. I'll fix it.
Looks good to me. thanks. merging it now. |
…s#198) (RobotWebTools#270) * Raise Exception if inappropriate bson module is installed (Related to RobotWebTools#198)
Check whether mongodb oriented bson is installed or not just after init_node,
and if appropriate bson is not installed, shutdown node with error message.
See: #198