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

BUG: utils/load_configuration: fix loading JSON with tabs #2010

Merged
1 commit merged into from
Jun 30, 2021
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jun 30, 2021

ruamel can't load JSON files with tabs as whitespace
if this specific excpetion is thrown, try loading the file with
json.load instead

this adds some tests for the load_configuration function
with JSON files and YAML file

@ghost ghost added bug Indicates an unexpected problem or unintended behavior component: core labels Jun 30, 2021
@ghost ghost added this to the 3.0.0 milestone Jun 30, 2021
@ghost ghost requested a review from waldbauer-certat June 30, 2021 11:37
@ghost ghost self-assigned this Jun 30, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2021

Codecov Report

Merging #2010 (5617fb9) into develop (dc4060e) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

❗ Current head 5617fb9 differs from pull request most recent head 26570c5. Consider uploading reports for the commit 26570c5 to get more accurate results

@@             Coverage Diff             @@
##           develop    #2010      +/-   ##
===========================================
- Coverage    75.95%   75.95%   -0.01%     
===========================================
  Files          423      423              
  Lines        22732    22751      +19     
  Branches      3019     3021       +2     
===========================================
+ Hits         17267    17281      +14     
- Misses        4758     4761       +3     
- Partials       707      709       +2     
Impacted Files Coverage Δ
intelmq/lib/utils.py 71.32% <54.54%> (-0.55%) ⬇️
intelmq/tests/lib/test_utils.py 99.47% <100.00%> (+0.02%) ⬆️
intelmq/lib/upgrades.py 69.01% <0.00%> (ø)

ruamel can't load JSON files with tabs as whitespace
if this specific excpetion is thrown, try loading the file with
json.load instead

this adds some tests for the load_configuration function
with JSON files and YAML file

fixes #1999
Copy link
Contributor

@waldbauer-certat waldbauer-certat left a comment

Choose a reason for hiding this comment

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

LGTM

@ghost ghost merged commit 03fdd24 into develop Jun 30, 2021
@ghost ghost deleted the fix-1999 branch June 30, 2021 15:50
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: core
Development

Successfully merging this pull request may close these issues.

None yet

2 participants