1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-23 22:51:30 +02:00

Removing couple of "buildins" polyglot types

This commit is contained in:
2020-04-20 20:22:50 +02:00
parent eac0b98d6f
commit c867f0321b
36 changed files with 85 additions and 109 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ from ebook_converter.utils.config_base import (
tweaks, from_json, to_json
)
from ebook_converter.utils.lock import ExclusiveFile
from ebook_converter.polyglot.builtins import string_or_bytes, native_string_type
from ebook_converter.polyglot.builtins import native_string_type
__license__ = 'GPL v3'
@@ -191,7 +191,7 @@ class OptionParser(optparse.OptionParser):
upper.__dict__[dest] = lower.__dict__[dest]
def add_option_group(self, *args, **kwargs):
if isinstance(args[0], string_or_bytes):
if isinstance(args[0], (str, bytes)):
args = list(args)
args[0] = native_string_type(args[0])
return optparse.OptionParser.add_option_group(self, *args, **kwargs)