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

🐛 The CLI no longer raise an unexpected exception when no encoding has been found #70

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

Ousret
Copy link
Member

@Ousret Ousret commented Jul 23, 2021

Unfortunate ending to the CLI script when no encoding has been found.

Given traceback:

line 192, in cli_detect
    ] if args.alternatives else x_[0].__dict__,
UnboundLocalError: local variable 'x_' referenced before assignment

Rocky mistake indeed...

In addition to the previous case that has been fixed, the CLI will now output a well JSON output even when there is no encoding that matches the content.

@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2021

Codecov Report

Merging #70 (362f3b1) into master (bdb91cd) will increase coverage by 0.17%.
The diff coverage is 54.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
+ Coverage   85.32%   85.50%   +0.17%     
==========================================
  Files          11       11              
  Lines        1077     1076       -1     
==========================================
+ Hits          919      920       +1     
+ Misses        158      156       -2     
Impacted Files Coverage Δ
charset_normalizer/cli/normalizer.py 65.21% <54.83%> (+1.77%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdb91cd...362f3b1. Read the comment docs.

@Ousret Ousret added bug Something isn't working CLI Anything related to the CLI script (normalizer) labels Jul 23, 2021
@Ousret Ousret changed the title 🐛 The CLI no longer raise an unexpected exception when no encoding has been found 🐛 The CLI no longer raise an unexpected exception when no encoding has been found Jul 23, 2021
@Ousret Ousret merged commit d283ef5 into master Jul 23, 2021
@Ousret Ousret deleted the patch-cli-bugfix branch July 23, 2021 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI Anything related to the CLI script (normalizer)
Development

Successfully merging this pull request may close these issues.

2 participants