Skip to content

Commit

Permalink
Merge pull request #800 from white-gecko/white-gecko-suppress-encodin…
Browse files Browse the repository at this point in the history
…g-warning

Suppress warning for not using custom encoding.
  • Loading branch information
joernhees authored Dec 14, 2017
2 parents dbc665d + 335c121 commit 300db62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rdflib/plugins/serializers/nquads.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, store):
def serialize(self, stream, base=None, encoding=None, **args):
if base is not None:
warnings.warn("NQuadsSerializer does not support base.")
if encoding is not None:
if encoding is not None and encoding.lower() != self.encoding.lower():
warnings.warn("NQuadsSerializer does not use custom encoding.")
encoding = self.encoding
for context in self.store.contexts():
Expand Down
2 changes: 1 addition & 1 deletion rdflib/plugins/serializers/nt.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, store):
def serialize(self, stream, base=None, encoding=None, **args):
if base is not None:
warnings.warn("NTSerializer does not support base.")
if encoding is not None:
if encoding is not None and encoding.lower() != self.encoding.lower():
warnings.warn("NTSerializer does not use custom encoding.")
encoding = self.encoding
for triple in self.store:
Expand Down

0 comments on commit 300db62

Please sign in to comment.