Skip to content

Fix for issue #50, to ignore errors on shiftjis encoding#51

Open
rheenen wants to merge 2 commits intomnooner256:masterfrom
rheenen:master
Open

Fix for issue #50, to ignore errors on shiftjis encoding#51
rheenen wants to merge 2 commits intomnooner256:masterfrom
rheenen:master

Conversation

@rheenen
Copy link
Copy Markdown

@rheenen rheenen commented Nov 1, 2016

…when trying to detect the type of contents.

…en trying to detect the type of contents
@heuer
Copy link
Copy Markdown
Contributor

heuer commented Nov 2, 2016

Sorry, wasn't aware that comments to a forked repository contribute to a PR as well. It wasn't my intention to hijack this PR

…r, as suggested by Lars Heur, enhanced to prevent PyLint warnings
Copy link
Copy Markdown
Contributor

@heuer heuer left a comment

Choose a reason for hiding this comment

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

Suggestion (got errors with Py 3.4 / 3.6 within another project):

def encode(self, encoding=None, errors='strict'):
    if encoding == 'shiftjis':
        raise LookupError("unknown encoding: shiftjis")
    return super(FakeString, self).encode(encoding, errors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants