Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions pdfkit/pdfkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
from .configuration import Configuration
import io
import codecs
try:
# Python 2.x and 3.x support for checking string types
basestring
unicode
except NameError:
basestring = str
unicode = str

# Python 2.x and 3.x support for checking string types
basestring = str.__mro__[-2]
unicode = type(u'')


class PDFKit(object):
Expand Down
10 changes: 3 additions & 7 deletions pdfkit/source.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# -*- coding: utf-8 -*-
import os
import io
try:
# Python 2.x and 3.x support for checking string types
assert basestring
assert unicode
except NameError:
basestring = str
unicode = str

# Python 2.x and 3.x support for checking string types
basestring = str.__mro__[-2]
unicode = type(u'')


class Source(object):
Expand Down