-
Notifications
You must be signed in to change notification settings - Fork 134
fixed MSCOLAB_timeout definition by list_operation_structure #2815
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -309,6 +309,8 @@ class MSUIDefaultConfig: | |
|
|
||
| # Dictionary options with fixed key/value pairs | ||
| fixed_dict_options = ["layout", "wms_prefetch", "topview", "sideview", "linearview"] | ||
| # List options with fixed length | ||
| fixed_list_options = ["MSCOLAB_timeout", ] | ||
|
|
||
| # Fixed key/value pair options | ||
| key_value_options = [ | ||
|
|
@@ -366,7 +368,7 @@ class MSUIDefaultConfig: | |
| "new_flighttrack_template": ["new-location"], | ||
| "gravatar_ids": ["[email protected]"], | ||
| "WMS_preload": ["https://wms-preload-url.com"], | ||
| "MSCOLAB_timeout": [[2, 10]], | ||
| "MSCOLAB_timeout": [0, 0], | ||
| "automated_plotting_flights": [["", "", "", "", "", ""]], | ||
| "automated_plotting_hsecs": [["http://www.your-wms-server.de", "", "", ""]], | ||
| "automated_plotting_vsecs": [["http://www.your-wms-server.de", "", "", ""]], | ||
|
|
@@ -418,6 +420,7 @@ class MSUIDefaultConfig: | |
| "__dict__", | ||
| "__weakref__", | ||
| "fixed_dict_options", | ||
| "fixed_list_options", | ||
| "dict_option_structure", | ||
| "list_option_structure", | ||
| "key_value_options", | ||
|
|
@@ -597,7 +600,7 @@ def merge_dict(existing_dict, new_dict): | |
| new_dict -- Dict with new values | ||
| """ | ||
| # Check if dictionary options with fixed key/value pairs match data types from default | ||
| for key in MSUIDefaultConfig.fixed_dict_options: | ||
| for key in MSUIDefaultConfig.fixed_dict_options + MSUIDefaultConfig.fixed_list_options: | ||
| if key in new_dict: | ||
| existing_dict[key] = compare_data( | ||
| existing_dict[key], new_dict[key] | ||
|
|
@@ -615,6 +618,8 @@ def merge_dict(existing_dict, new_dict): | |
| for option_key in new_dict[key]: | ||
| for dos_key_key in dos[key]: | ||
| data, match = compare_data(dos[key][dos_key_key], new_dict[key][option_key]) | ||
| if key in MSUIDefaultConfig.fixed_list_options: | ||
| match = len(dos[key][dos_key_key]) == len(new_dict[key][option_key]) | ||
| if match: | ||
| temp_data[option_key] = new_dict[key][option_key] | ||
| break | ||
|
|
@@ -626,14 +631,15 @@ def merge_dict(existing_dict, new_dict): | |
| for key in los: | ||
| if key in new_dict: | ||
| temp_data = [] | ||
| for i in range(len(new_dict[key])): | ||
| for los_key_item in los[key]: | ||
| data, match = compare_data(los_key_item, new_dict[key][i]) | ||
| if match: | ||
| temp_data.append(data) | ||
| break | ||
| if temp_data != []: | ||
| existing_dict[key] = temp_data | ||
| if key not in MSUIDefaultConfig.fixed_list_options: | ||
| for i in range(len(new_dict[key])): | ||
| for los_key_item in los[key]: | ||
| data, match = compare_data(los_key_item, new_dict[key][i]) | ||
| if match: | ||
| temp_data.append(data) | ||
| break | ||
| if temp_data != []: | ||
| existing_dict[key] = temp_data | ||
|
|
||
| # Check if options with fixed key/value pair structure match data types from default | ||
| for key in MSUIDefaultConfig.key_value_options: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
seems gh has changed the content.
The test is then very fragile and needs a better solution
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.
#2816