-
Notifications
You must be signed in to change notification settings - Fork 32
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
change get_channel_group_id to return channel id if no group_id is set #681
Conversation
@@ -967,10 +967,10 @@ def get_channel_group_id(self, station_id, channel_id): | |||
""" | |||
res = self.__get_channel(station_id, channel_id) | |||
if 'channel_group_id' not in res.keys(): | |||
logger.warning( | |||
'Channel group ID not set for channel {} in station {}, returning -1'.format( | |||
logger.info( |
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.
I agree with you that warning is a bit much, but maybe info is too little? Not sure. I think STATUS would be optimal actually, as that would still show up in the logs by default in the new system. Though for that we need to wait until the new logging is done :)
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.
looks good. I thought we already had this implemented. (Maybe I only did it on the refactor
branch)
I would not even log an info method. This is a robust way for writing modules that work with antenna group and without, so we don't want to get flushed with log messages for an expected behaviour.
8491a4d
to
d001c03
Compare
This PR changes the function get_channel_group_id to return the channel id if no group id is set. The group_ids describe antennas are set for antennas with the same positions. Looping over the group_ids instead of the channel_ids and assign a quantity to several station ids can therefore be faster. The channel_id is more specific, therefore returning the channel id if no group id is set should not cause problems.